jquery-livetype-rails 0.1.0 → 0.2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jquery-livetype-rails/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.liveType.js +19 -19
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40ea1f409c11d7c57dab9671245ed9e1280c447a
|
4
|
+
data.tar.gz: bf1de2fddc9d95fbd28b94d0cd210989b15d2727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413577222c3a1e6f01d85193ed9b44d0d13be1112735131d6da6491dd4a0df0478546b27aa0e33ba2624837ad01749ab30a8fabded337b9680e8df0b6e4d436c
|
7
|
+
data.tar.gz: 76295e2dd4e7dee816eb36c1efc1e454b0a0843a12091d32037e5e24df5ccc080c2ae8cf70c73f93fac1da6c366399b06af118cf2f200dc9baa34e9a8384bdd6
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery LiveType 0.
|
2
|
+
* jQuery LiveType 0.2.pre
|
3
3
|
*
|
4
4
|
* Copyright 2013, Tobal San (http://www.smartrock.fr)
|
5
5
|
* Licensed under the MIT license.
|
@@ -16,35 +16,35 @@ $.fn.liveType = function(opts){
|
|
16
16
|
punctuationChars : ['.', '.', '?', '!', ':', ';'], // An array of characters to pause on
|
17
17
|
cursorEffect : true, // "True" for smooth blinking, "false" for plain blinking
|
18
18
|
cursorSpeed : 500, // Cursor blinking speed
|
19
|
-
cursor : '|'
|
19
|
+
cursor : '|', // Cursor type
|
20
|
+
cursorClass : 'cursor' // The classname for the cursor element
|
20
21
|
},
|
21
|
-
settings = $.extend(defaults, opts)
|
22
|
+
settings = $.extend(defaults, opts),
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
text = $this.html(),
|
25
|
+
cursor = 0,
|
26
|
+
t = setTimeout(type, settings.typeSpeed);
|
25
27
|
|
26
|
-
|
28
|
+
$this.empty().append('<span class="' + settings.cursorClass + '">' + settings.cursor + '</span>');
|
27
29
|
|
28
30
|
setInterval(cursorAnimation, settings.cursorSpeed);
|
29
|
-
t = setTimeout(type, settings.typeSpeed);
|
30
31
|
|
31
32
|
function cursorAnimation() {
|
32
33
|
if (settings.cursorEffect) {
|
33
|
-
$(
|
34
|
+
$(settings.cursorClass, $this).animate({
|
34
35
|
opacity: 0
|
35
36
|
}, "fast", 'swing').animate({
|
36
37
|
opacity: 1
|
37
38
|
}, "fast", 'swing');
|
38
39
|
} else {
|
39
|
-
if ($(
|
40
|
-
$(
|
40
|
+
if ($(settings.cursorClass, $this).is(':visible')) {
|
41
|
+
$(settings.cursorClass, $this).hide();
|
41
42
|
} else {
|
42
|
-
$(
|
43
|
+
$(settings.cursorClass, $this).show();
|
43
44
|
}
|
44
45
|
}
|
45
46
|
}
|
46
47
|
|
47
|
-
|
48
48
|
function type() {
|
49
49
|
cursor++;
|
50
50
|
if(cursor <= text.length) {
|
@@ -52,21 +52,21 @@ $.fn.liveType = function(opts){
|
|
52
52
|
if(settings.punctuationChars.indexOf(text.substr(cursor-2, 1)) > -1) {
|
53
53
|
clearTimeout(t);
|
54
54
|
cursor++;
|
55
|
-
setTimeout(type, settings.pauseTime);
|
55
|
+
t = setTimeout(type, settings.pauseTime);
|
56
56
|
} else {
|
57
|
-
$this.html(text.substr(0, cursor) + '<span class="
|
58
|
-
setTimeout(type, settings.typeSpeed)
|
57
|
+
$this.html(text.substr(0, cursor) + '<span class="' + settings.cursorClass + '">' + settings.cursor + '</span>');
|
58
|
+
t = setTimeout(type, settings.typeSpeed);
|
59
59
|
}
|
60
60
|
} else {
|
61
61
|
if(cursor % settings.pauseEvery) {
|
62
|
-
$this.html(text.substr(0, cursor) + '<span class="
|
63
|
-
setTimeout(type, settings.typeSpeed)
|
62
|
+
$this.html(text.substr(0, cursor) + '<span class="' + settings.cursorClass + '">' + settings.cursor + '</span>');
|
63
|
+
t = setTimeout(type, settings.typeSpeed);
|
64
64
|
} else {
|
65
65
|
clearTimeout(t);
|
66
66
|
cursor++;
|
67
|
-
setTimeout(type, settings.pauseTime);
|
67
|
+
t = setTimeout(type, settings.pauseTime);
|
68
68
|
}
|
69
69
|
}
|
70
70
|
}
|
71
71
|
}
|
72
|
-
}
|
72
|
+
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-livetype-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Curt Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A build of the jQuery LiveType Plugin, written by written by Tobal San,
|
14
14
|
packaged for the Rails asset pipeline.
|
@@ -38,9 +38,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
38
38
|
version: '0'
|
39
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "
|
41
|
+
- - ">"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 1.3.1
|
44
44
|
requirements: []
|
45
45
|
rubyforge_project:
|
46
46
|
rubygems_version: 2.4.5
|