aboutsummaryrefslogtreecommitdiffstats
path: root/demos/tabs/ajax.html
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-04-11 10:39:33 -0400
committerScott González <scott.gonzalez@gmail.com>2011-04-11 10:39:33 -0400
commita3370064d85b30d89846efde00e461a2d493dfda (patch)
treefa5e476f3ae94d76eff458e3a3d5fc2db982f7bc /demos/tabs/ajax.html
parentccac8cd4920f7d79d046fb34589d0dbb48d31551 (diff)
downloadjquery-ui-a3370064d85b30d89846efde00e461a2d493dfda.tar.gz
jquery-ui-a3370064d85b30d89846efde00e461a2d493dfda.zip
Tabs: Update ajax demo to use beforeLoad event instead of deprecated ajaxOptions option.
Diffstat (limited to 'demos/tabs/ajax.html')
-rw-r--r--demos/tabs/ajax.html9
1 files changed, 4 insertions, 5 deletions
diff --git a/demos/tabs/ajax.html b/demos/tabs/ajax.html
index 284de57f9..407914589 100644
--- a/demos/tabs/ajax.html
+++ b/demos/tabs/ajax.html
@@ -12,13 +12,12 @@
<script>
$(function() {
$( "#tabs" ).tabs({
- ajaxOptions: {
- error: function( xhr, status, index, anchor ) {
- var selector = $( anchor ).attr( "aria-controls" );
- $( selector ).html(
+ beforeLoad: function( event, ui ) {
+ ui.jqXHR.error(function() {
+ ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
- }
+ });
}
});
});