title-switcher 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +44 -2
  2. package/package.json +10 -2
package/README.md CHANGED
@@ -1,5 +1,4 @@
1
- title-switcher-v2
2
- ==============
1
+ # [title-switcher-v2](https://www.npmjs.com/package/title-switcher)
3
2
 
4
3
  This is the updated title-switcher which takes a simpler approach and improves many deficiencies of the original title-switcher.
5
4
 
@@ -19,3 +18,46 @@ the sample code for best results.
19
18
 
20
19
  Live example at https://joshuaheagle.com/projects/title-switcher. Enjoy!
21
20
 
21
+ ## Setup Example
22
+
23
+ ### Sequential Titles
24
+
25
+ ```html
26
+ <div class="titles">
27
+ <h4 style='color: #be1010; text-align: center;'>I built this <em>superb</em> <strong>plug-in</strong>.</h4>
28
+ <h4 style='color: #1414af; text-align: right;'><strong>TitleSwitcher</strong> is great to display <em>company
29
+ objectives</em>.</h4>
30
+ <h4 style='color: #ff7816; text-align: center; text-decoration: underline;'>Feel free to contribute and use this
31
+ plug-in.</h4>
32
+ <h4 style='color: #0c710c;'>You can find more projects on <a href='https://github.com/jheagle' target='_blank'>my
33
+ <strong>GitHub</strong></a>.</h4>
34
+ </div>
35
+ ```
36
+
37
+ ```javascript
38
+ const orderedTitles = new TitleSwitcher('.titles', 'typingEffect')
39
+ // the first arguments is to not randomly switch, then the time between switching, and finally the delay of the effect (typing in this case)
40
+ orderedTitles.startTitles({ isRandom: false, delaySwitch: 400, delayEffect: 100 })
41
+ ```
42
+
43
+ ### Random Titles
44
+
45
+ ```html
46
+ <div class='titles-random'>
47
+ <h4>Innovate</h4>
48
+ <h4>Create</h4>
49
+ <h4>Connect</h4>
50
+ <h4>Socialise</h4>
51
+ <h4>Collaborate</h4>
52
+ <h4>Build</h4>
53
+ <h4>Organise</h4>
54
+ <h4>Broadcast</h4>
55
+ </div>
56
+ ```
57
+
58
+ ```javascript
59
+ const randomTitles = new TitleSwitcher('.titles-random', 'typingEffect')
60
+ // set to random title switching, then defaults are 400 and 200 milliseconds for switch/effects
61
+ randomTitles.startTitles({ isRandom: true })
62
+ ```
63
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "title-switcher",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Add typing effect to titles and also switch through several titles.",
5
5
  "scripts": {
6
6
  "build": "gulp build",
@@ -13,6 +13,14 @@
13
13
  "watch": "gulp watchFull",
14
14
  "watch:test": "gulp watchTest"
15
15
  },
16
+ "keywords": [
17
+ "decorative",
18
+ "design",
19
+ "creative",
20
+ "title",
21
+ "typing",
22
+ "typing-effect"
23
+ ],
16
24
  "repository": {
17
25
  "type": "git",
18
26
  "url": "git+https://github.com/jheagle/title-switcher-v2.git"
@@ -24,7 +32,7 @@
24
32
  },
25
33
  "homepage": "https://github.com/jheagle/title-switcher-v2#readme",
26
34
  "devDependencies": {
27
- "js-build-tools": "^2.2.7"
35
+ "js-build-tools": "^2.2.8"
28
36
  },
29
37
  "dependencies": {},
30
38
  "main": "dist/main.min.js",