Skip to content

Commit a337006

Browse files
committed
Tabs: Update ajax demo to use beforeLoad event instead of deprecated ajaxOptions option.
1 parent ccac8cd commit a337006

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

demos/tabs/ajax.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
<script>
1313
$(function() {
1414
$( "#tabs" ).tabs({
15-
ajaxOptions: {
16-
error: function( xhr, status, index, anchor ) {
17-
var selector = $( anchor ).attr( "aria-controls" );
18-
$( selector ).html(
15+
beforeLoad: function( event, ui ) {
16+
ui.jqXHR.error(function() {
17+
ui.panel.html(
1918
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
2019
"If this wouldn't be a demo." );
21-
}
20+
});
2221
}
2322
});
2423
});

0 commit comments

Comments
 (0)