Tabs: Update ajax demo to use beforeLoad event instead of deprecated ajaxOptions option.

This commit is contained in:
Scott González 2011-04-11 10:39:33 -04:00
parent ccac8cd492
commit a3370064d8

View File

@ -12,13 +12,12 @@
<script> <script>
$(function() { $(function() {
$( "#tabs" ).tabs({ $( "#tabs" ).tabs({
ajaxOptions: { beforeLoad: function( event, ui ) {
error: function( xhr, status, index, anchor ) { ui.jqXHR.error(function() {
var selector = $( anchor ).attr( "aria-controls" ); ui.panel.html(
$( selector ).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " + "Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." ); "If this wouldn't be a demo." );
} });
} }
}); });
}); });