Skip to content

Commit

Permalink
Moved event listeners outside of the check for boxes.length so they a…
Browse files Browse the repository at this point in the history
…re registered even if there are no current wow elements on the page.
  • Loading branch information
Alex Ford committed Oct 28, 2014
1 parent 94e2bdd commit 45ac6cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dist/wow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/wow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/wow.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ class @WOW
@resetStyle()
else
@applyStyle(box, true) for box in @boxes
@util().addEvent window, 'scroll', @scrollHandler
@util().addEvent window, 'resize', @scrollHandler
@interval = setInterval @scrollCallback, 50
@util().addEvent window, 'scroll', @scrollHandler
@util().addEvent window, 'resize', @scrollHandler
@interval = setInterval @scrollCallback, 50
if @config.live
new MutationObserver (records) =>
for record in records
Expand Down

0 comments on commit 45ac6cd

Please sign in to comment.