From: ayaya Date: Tue, 16 Oct 2012 12:02:50 +0000 (+0800) Subject: Rebind event handler when call foundationTopBar repeatly X-Git-Tag: v3.2.0.rc1~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1024%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Rebind event handler when call foundationTopBar repeatly --- diff --git a/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js b/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js index e84e805cd..8c7beb705 100644 --- a/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +++ b/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js @@ -35,7 +35,7 @@ methods.largestUL(); } - $('.top-bar .toggle-topbar').live('click.fndtn', function (e) { + $('.top-bar .toggle-topbar').die('click.fndtn').live('click.fndtn', function (e) { e.preventDefault(); if (methods.breakpoint()) { @@ -46,7 +46,7 @@ }); // Show the Dropdown Levels on Click - $('.top-bar .has-dropdown>a').live('click.fndtn', function (e) { + $('.top-bar .has-dropdown>a').die('click.fndtn').live('click.fndtn', function (e) { if (Modernizr.touch || methods.breakpoint()) e.preventDefault(); @@ -69,7 +69,7 @@ }); // Go up a level on Click - $('.top-bar .has-dropdown .back').live('click.fndtn', function (e) { + $('.top-bar .has-dropdown .back').die('click.fndtn').live('click.fndtn', function (e) { e.preventDefault(); var $this = $(this),