From: Jörn Zaefferer Date: Fri, 28 Dec 2012 09:07:02 +0000 (+0100) Subject: Tabs: Update manipulation demo - use delegate instead of live (can't use on until... X-Git-Tag: 1.10.0-rc.1~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55ebc958793e5a3e5c6ce7e232aa502b320d23ca;p=jquery-ui.git Tabs: Update manipulation demo - use delegate instead of live (can't use on until we drop core 1.6 support), reuse selected element --- diff --git a/demos/tabs/manipulation.html b/demos/tabs/manipulation.html index 78859e5c0..9a66076e7 100644 --- a/demos/tabs/manipulation.html +++ b/demos/tabs/manipulation.html @@ -75,7 +75,7 @@ }); // close icon: removing the tab on click - $( "#tabs span.ui-icon-close" ).live( "click", function() { + tabs.delegate( "span.ui-icon-close", "click", function() { var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" ); $( "#" + panelId ).remove(); tabs.tabs( "refresh" );