beforeLoad firing in tab widget when content loaded from cache interfering with "Loading..." text
I am using version 1.9.2. of jquery-ui-tabs.
I want to set some Loading... text when beforeLoad fires.
But when I do this:
$('#tabs').tabs({
cache: true,
beforeLoad: function(event, ui) {
return $(ui.panel).html("Loading...");
}
});
once the cache hits start the beforeLoad code and the component's reloading of the cached content interfere with each other and the content never gets reloaded (the "Loading..." text remains.
When I turn off caching the problem goes away--but I would like to keep the benefit of the caching.
Does anyone have any suggestions on a better way to do this?
Should the beforeLoad even be firing when the content is loaded from the cache?
I suppose I could do some messy stuff by unbinding the event (or bypassing my code) once I know each tab has been selected at least once but there would seem to be a better way.