Skip to content Skip to sidebar Skip to footer

How To Change `cache` And `ajaxOptions` When Upgrading To JQuery UI 1.10?

Since I upgraded to jQuery UI 1.10 something has changed. Before that upgrade, code related to my jQuery UI Tab was the following: $('.selector').tabs({ cache: true, ajaxOption

Solution 1:

A working approach is:

$(".selector").tabs({
    beforeLoad: function (event, ui) {
        if ( ui.tab.data( "loaded" ) ) {
          event.preventDefault();
          return;
        }
        ui.jqXHR.success(function() {
          ui.tab.data( "loaded", true );
        });
    }
});

Source: https://github.com/jquery/jqueryui.com/blob/master/page/upgrade-guide/1.9.md#deprecated-ajaxoptions-and-cache-options-added-beforeload-event


Post a Comment for "How To Change `cache` And `ajaxOptions` When Upgrading To JQuery UI 1.10?"