Skip to content

Commit

Permalink
event.target fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Sajnóg committed Aug 28, 2015
1 parent 0f7e021 commit 8865b9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/aos.js

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

3 changes: 2 additions & 1 deletion src/aos.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@
* If so refresh plugin data
*/
document.addEventListener('DOMNodeRemoved', function (event) {
if (event.target.hasAttribute('aos')) {
var el = event.target;
if (el && el.nodeType === 1 && el.hasAttribute && event.target.hasAttribute('aos')) {
setTimeout(function(){
generate();
handleScroll();
Expand Down

0 comments on commit 8865b9c

Please sign in to comment.