Click event fired multiple times
-
Hi, as i was in a hurry and didn′t have time to wait for a response, i′ve solved a big problem with sticky popup in Ajax Loaded Themes (Mine is Bridge Multipurpose).
The Issue: As many times as you change the page where you are, Click event is being binded, so Jquery actions are fired as many times as the page has changed with AJAX. So, as this number of pages changing is even, no problem, because this fires the actions uneven times and thats the same as once. But changing the page uneven number of times fires the actions an even number of times and that doesn’t work.
The solution: jQuery(“.popup-header”).unbind(‘click’); just before every jQuery( “.popup-header” ).click(function() { that class-sticky-popup.php has.
I haven′t seen anybody else with this problem, but just in case here is my solution.
Maybe you want to implement it in future upgrades.
Bye!
- The topic ‘Click event fired multiple times’ is closed to new replies.