From 9f36c1000136a99f2b96033abcec90d54da4a4f1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 31 Jan 2010 22:37:22 +0000 Subject: Updated XHR binded events to work better in jQuery 1.4.1. Using .live() for event delegation instead of jQuery.data() and checking to see if an element was previously binded. --- plugins/UserFlag/UserFlagPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/UserFlag') diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index a33869c19..8728e5703 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -208,8 +208,8 @@ class UserFlagPlugin extends Plugin function onEndShowScripts($action) { $action->inlineScript('if ($(".form_entity_flag").length > 0) { '. - 'SN.U.FormXHR($(".form_entity_flag")); '. - '}'); + '$(".form_entity_flag").bind("click", function() {'. + 'SN.U.FormXHR($(this)); return false; }); }'); return true; } -- cgit v1.2.3-54-g00ecf