From 1a55f9217d022debc70a103d0315db97116a7bb9 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 29 Jan 2014 20:51:59 -0500 Subject: [PATCH] turn off click events to prevent multiple calls' --- public/src/forum/topic.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index e9cfd0bf6a..59d80041e8 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -11,15 +11,15 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { $('body').on('action:ajaxifying', function(ev, data) { if(data.url.indexOf('topic') === 0) { - $('.pagination-block a').on('click', function() { + $('.pagination-block a').off('click').on('click', function() { return false; }); - $('.pagination-block i:first').on('click', function() { + $('.pagination-block i:first').off('click').on('click', function() { app.scrollToTop(); }); - $('.pagination-block i:last').on('click', function() { + $('.pagination-block i:last').off('click').on('click', function() { app.scrollToBottom(); });