jquery-watcher 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/assets/javascripts/jquery-watcher/watcher.coffee +7 -6
- data/lib/jquery/watcher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12721398d3d9d15fb67d691a30defa64e9d22f84
|
4
|
+
data.tar.gz: cb3ad13148e07691d6067d3d0d74b0119dc00174
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33581fd3500092ddde5383582a93ab17ceac6b17d3dc797144e75b5823437febf8e4276d1db1e2de21314e1f23e97e04b5a95e7c6780f174e19e76507d3a91a8
|
7
|
+
data.tar.gz: 757b1b5b1635c602cb8a76fb9113db0a2f363c56105bc7ba1e34eb524355cf6da5912a72067ea15bc05206d59c303f4b1753ed5df7ff7fa83fbfc0a7c37f975f
|
data/CHANGELOG.md
CHANGED
@@ -5,22 +5,23 @@ class @JqueryWatcher
|
|
5
5
|
id = Math.floor(Math.random() * 10000000000000001)
|
6
6
|
|
7
7
|
register = (element) ->
|
8
|
+
return unless element.length
|
8
9
|
return if element.data('jquery-watcher-id-' + id + '-watching') == 'true'
|
9
10
|
|
10
11
|
element.data(('jquery-watcher-id-' + id + '-watching'), 'true')
|
11
12
|
|
12
|
-
|
13
|
+
$.each(element, callback)
|
13
14
|
|
14
15
|
$(document).ready ->
|
15
|
-
|
16
|
+
$(selector).each ->
|
17
|
+
register($(this))
|
16
18
|
|
17
19
|
document.addEventListener 'turbolinks:load', ->
|
18
|
-
|
20
|
+
$(selector).each ->
|
21
|
+
register($(this))
|
19
22
|
|
20
23
|
this.observer.add selector, (node) ->
|
21
|
-
|
22
|
-
|
23
|
-
register(element)
|
24
|
+
register($(node))
|
24
25
|
|
25
26
|
|
26
27
|
jQuery['watcher'] = new JqueryWatcher
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-watcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Schwab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-rails
|