]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs manipulation demo: Update for aria-controls.
authorScott González <scott.gonzalez@gmail.com>
Fri, 18 May 2012 20:18:46 +0000 (16:18 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 18 May 2012 20:18:46 +0000 (16:18 -0400)
demos/tabs/manipulation.html

index 205fc2e4d49aa26d85c366d4d5c44df7475bdf13..085d42c4301145a069a8da63c7c78bae90c4658f 100644 (file)
@@ -76,8 +76,8 @@
 
                // close icon: removing the tab on click
                $( "#tabs span.ui-icon-close" ).live( "click", function() {
-                       $( this ).closest( "li" ).remove();
-                       $( "#" + $( this ).prev().attr( "aria-controls" ) ).remove();
+                       var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" );
+                       $( "#" + panelId ).remove();
                        tabs.tabs( "refresh" );
                });
        });