Skip to content

Commit 8a7fdc5

Browse files
committed
Merge pull request #984 from projectblacklight/more-inclusive-count-selector
update selector for bookmark count to handle any data-role bookmark-coun...
2 parents cb2d0b1 + d704e97 commit 8a7fdc5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/assets/javascripts/blacklight/bookmark_toggle.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
$(Blacklight.do_bookmark_toggle_behavior.selector).bl_checkbox_submit({
77
//css_class is added to elements added, plus used for id base
88
css_class: "toggle_bookmark",
9-
success: function(checked, response) {
10-
if (response.bookmarks) {
11-
$('#bookmarks_nav span[data-role=bookmark-counter]').text(response.bookmarks.count);
12-
}
13-
}
14-
});
9+
success: function(checked, response) {
10+
if (response.bookmarks) {
11+
$('[data-role=bookmark-counter]').text(response.bookmarks.count);
12+
}
13+
}
14+
});
1515
};
1616
Blacklight.do_bookmark_toggle_behavior.selector = "form.bookmark_toggle";
1717

0 commit comments

Comments
 (0)