turn off click events to prevent multiple calls'

v1.18.x
Baris Soner Usakli 11 years ago
parent 06ca569554
commit 1a55f9217d

@ -11,15 +11,15 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
$('body').on('action:ajaxifying', function(ev, data) { $('body').on('action:ajaxifying', function(ev, data) {
if(data.url.indexOf('topic') === 0) { if(data.url.indexOf('topic') === 0) {
$('.pagination-block a').on('click', function() { $('.pagination-block a').off('click').on('click', function() {
return false; return false;
}); });
$('.pagination-block i:first').on('click', function() { $('.pagination-block i:first').off('click').on('click', function() {
app.scrollToTop(); app.scrollToTop();
}); });
$('.pagination-block i:last').on('click', function() { $('.pagination-block i:last').off('click').on('click', function() {
app.scrollToBottom(); app.scrollToBottom();
}); });

Loading…
Cancel
Save