diff options
author | Sarven Capadisli <csarven@status.net> | 2010-01-31 22:37:22 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-01-31 22:37:22 +0000 |
commit | 9f36c1000136a99f2b96033abcec90d54da4a4f1 (patch) | |
tree | a61f38fb3aaf3d6766eb9d3de8fe04c000adb7f3 /plugins/UserFlag | |
parent | 72037d61436978daa1edbd19d52b7e6fc6ae1fa8 (diff) |
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.
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r-- | plugins/UserFlag/UserFlagPlugin.php | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |