From 616cc91eb288d2283620cc1c06e8af42814b2f39 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 6 Nov 2013 15:49:44 +0100 Subject: [PATCH] // Fix bug JQuery on handler --- js/admin.js | 6 +++--- js/toolbar.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/admin.js b/js/admin.js index 6c6804cfd..3b1aee859 100644 --- a/js/admin.js +++ b/js/admin.js @@ -848,13 +848,13 @@ $(document).ready(function() toggleMultishopDefaultValue(v, key.substr(24, len - 25)); }); - $(".copy2friendlyUrl").on('keyup change',function(e){ + $(document).on('keyup change', '.copy2friendlyUrl', function(e){ if(!isArrowKey(e)) return copy2friendlyURL(); }); // on live will make this binded for dynamic content - $(".updateCurrentText").on('keyup change',function(e){ + $(document).on('keyup change', '.updateCurrentText', function(e){ if(typeof e == KeyboardEvent) if(isArrowKey(e)) return; @@ -862,7 +862,7 @@ $(document).ready(function() updateCurrentText(); }); - $(".copyMeta2friendlyURL").on('keyup change',function(e){ + $(document).on('keyup change', '.copyMeta2friendlyURL', function(e){ if(!isArrowKey(e)) return copyMeta2friendlyURL() }); diff --git a/js/toolbar.js b/js/toolbar.js index 537a56c21..b687ef064 100644 --- a/js/toolbar.js +++ b/js/toolbar.js @@ -46,21 +46,21 @@ $(document).ready(function(){ }); // if count warnings - $('#linkSeeMore').on('click', function(e){ + $(document).on('click', '#linkSeeMore', function(e){ e.preventDefault(); $('#seeMore').show(); $(this).hide(); $('#linkHide').show(); return false; }); - $('#linkHide').on('click', function(e){ + $(document).on('click', '#linkHide', function(e){ e.preventDefault(); $('#seeMore').hide(); $(this).hide(); $('#linkSeeMore').show(); return false; }); - $('#hideWarn').on('click', function(e){ + $(document).on('click', '#hideWarn', function(e){ e.preventDefault(); $('.warn').hide('slow', function (){ $('.warn').remove();