Skip to content

Commit c3d9bd0

Browse files
petersendiditscottgonzalez
authored andcommitted
Tabs: update sortable demo to call refresh method. Fixes #4524 Tabs: Sortable demo causes bad index references
1 parent 09faa7c commit c3d9bd0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

demos/tabs/sortable.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
<link rel="stylesheet" href="../demos.css">
1414
<script>
1515
$(function() {
16-
$( "#tabs" ).tabs().find( ".ui-tabs-nav" ).sortable({ axis: "x" });
16+
var tabs = $( "#tabs" ).tabs();
17+
tabs.find( ".ui-tabs-nav" ).sortable({
18+
axis: "x",
19+
stop: function() {
20+
tabs.tabs( "refresh" );
21+
}
22+
});
1723
});
1824
</script>
1925
</head>

0 commit comments

Comments
 (0)