Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from YaleDHLab/event-binding
Browse files Browse the repository at this point in the history
Event binding
  • Loading branch information
duhaime authored Sep 28, 2017
2 parents 1283de2 + 4974491 commit f5af138
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions assets/js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,18 @@
e.preventDefault();
handleMouseenter(this);
})

img.addEventListener('mouseleave', function(e) {
e.stopPropagation();
e.preventDefault();
handleMouseleave(this);
})
}

document.body.addEventListener('click', function(e) {
handleClick(e);
})

var galleryItems = document.querySelector('.gallery-items');
galleryItems.addEventListener('mouseleave', function(e) {
e.stopPropagation();
e.preventDefault();
handleMouseleave(this);
})
}

/**
Expand Down

0 comments on commit f5af138

Please sign in to comment.