Skip to content

Commit

Permalink
Bind result collapse further up DOM tree
Browse files Browse the repository at this point in the history
This prevents the event handler from getting clobbered during history
state change. Fixes #88.
  • Loading branch information
Mike Graves committed Nov 6, 2014
1 parent 6f4c7f2 commit 6d96958
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/assets/javascripts/geoblacklight/modules/collapse.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Blacklight.onLoad(function() {
$('.document').each(function(index, value) {
value = $(value);
value.find('[data-layer-id]').on('click', function() {
value.find('.collapse').collapse('toggle');
$('#content')
.on('click', '#documents [data-layer-id]', function() {
$(this).find('.collapse').collapse('toggle');
});
});
});

0 comments on commit 6d96958

Please sign in to comment.