Tabs: Update manipulation demo - use delegate instead of live (can't use on until we drop core 1.6 support), reuse selected element

This commit is contained in:
Jörn Zaefferer 2012-12-28 10:07:02 +01:00
parent 6da708ef8e
commit 55ebc95879

View File

@ -75,7 +75,7 @@
}); });
// close icon: removing the tab on click // 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" ); var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" );
$( "#" + panelId ).remove(); $( "#" + panelId ).remove();
tabs.tabs( "refresh" ); tabs.tabs( "refresh" );