Skip to content

Commit

Permalink
update selector for bookmark count to handle any data-role bookmark-c…
Browse files Browse the repository at this point in the history
…ounter
  • Loading branch information
mejackreed committed Sep 4, 2014
1 parent cb2d0b1 commit 9044f48
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/assets/javascripts/blacklight/bookmark_toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
$(Blacklight.do_bookmark_toggle_behavior.selector).bl_checkbox_submit({
//css_class is added to elements added, plus used for id base
css_class: "toggle_bookmark",
success: function(checked, response) {
if (response.bookmarks) {
$('#bookmarks_nav span[data-role=bookmark-counter]').text(response.bookmarks.count);
}
}
});
success: function(checked, response) {
if (response.bookmarks) {
$('*[data-role=bookmark-counter]').text(response.bookmarks.count);
}
}
});
};
Blacklight.do_bookmark_toggle_behavior.selector = "form.bookmark_toggle";
Blacklight.do_bookmark_toggle_behavior.selector = "form.bookmark_toggle";

Blacklight.onLoad(function() {
Blacklight.do_bookmark_toggle_behavior();
Blacklight.do_bookmark_toggle_behavior();
});


})(jQuery);

0 comments on commit 9044f48

Please sign in to comment.