corn_starch 1.3.21 → 1.3.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fae82bc79cce35342c6a02e2dfb9765207b3b4bc
4
- data.tar.gz: d5e727f5752111b22766187f5f99c2461778bfa1
3
+ metadata.gz: b1ddcc9d90966e22137a94f79ee3d196f030348b
4
+ data.tar.gz: d310a7d78aa2bef25bf2f7e8fe666377e2f873cb
5
5
  SHA512:
6
- metadata.gz: 8f09f7f815efba9c0bd0eda46e83bfe4dc876d1ed5b758b3f696ebcb3fcefbd10add191392903251ab8b73bada53490a3eb63a6eaf9bee3de4215d7c9ea40491
7
- data.tar.gz: a3604837cf5c132d4583029211ac9ae0d6c69e54894422bd2318d9a0b23424fe1cf10896ccb0e70a2bf73ca2a3181473bf757415abacfa3d2e4acbd4ad1d0962
6
+ metadata.gz: 48b45125ca996daece6e3bb89778c11f16e0a066e9b981cf544d4763d59a8e577921f1ae3577fdeed87ed746402999e8846ffa04fc750f97d9f32499b43aa15b
7
+ data.tar.gz: b4329065707e276a2366ec85e3b7ec5383e744bc2b99bd14c6418cc95081eb6027f978c7990a0c3b1831f69a6703089bf2e2a3babc77c9f0abd1137fdb3a2814
@@ -14,13 +14,24 @@ $ ->
14
14
  infiniscroll_container = infiniscroll_container[0]
15
15
 
16
16
  # Handle Scroll Events
17
- $(window).scroll ->
17
+ $(window).scroll infiniscroll_handler
18
18
 
19
- # Check Position
20
- if ($(window).scrollTop() + $(window).height()) >= ($(document).height() - infiniscroll_container.getAttribute('infiniscroll-margin'))
19
+ # Scroll Handler
20
+ window.infiniscroll_handler = () ->
21
21
 
22
- # Scroll it, bitch !
23
- infiniscroll infiniscroll_container.id
22
+ # Acquire Container
23
+ infiniscroll_container = $('.infiniscroll-container')[0]
24
+
25
+ # Check Position
26
+ if ($(window).scrollTop() + $(window).height()) >= ($(document).height() - infiniscroll_container.getAttribute('infiniscroll-margin'))
27
+
28
+ # DEBUG
29
+ $(window).unbind('scroll')
30
+
31
+ alert('foobar')
32
+
33
+ # Scroll it, bitch !
34
+ infiniscroll infiniscroll_container.id
24
35
 
25
36
  # InfiniScroll
26
37
  window.infiniscroll = (container) ->
@@ -34,13 +45,7 @@ window.infiniscroll = (container) ->
34
45
  next = c.attr 'infiniscroll-next'
35
46
 
36
47
  # Check End
37
- if next == 'none'
38
-
39
- # Drop InfiniScroll
40
- $(window).unbind('scroll')
41
-
42
- # Done
43
- return
48
+ return if next == 'none'
44
49
 
45
50
  # Construct Args
46
51
  if args == ''
@@ -60,3 +65,6 @@ window.infiniscroll = (container) ->
60
65
 
61
66
  # Append Content
62
67
  $("##{container}").append data['content']
68
+
69
+ # Re-Attach Scroll Handler
70
+ $(window).scroll infiniscroll_handler
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.3.21'
2
+ VERSION = '1.3.22'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.21
4
+ version: 1.3.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse