views:

194

answers:

2

I want to show 'loading' when the tab is loading... cause the content is coming with ajax. Heres my code

$('#tab').tabs({
            spinner: 'Loading'
        });

The content comes just fine but it never shows "Loading"... at all

Am I Blind or Im doign something wrong?... Have tried IE and Firefox.

A: 

I think your answer is here:

http://stackoverflow.com/questions/1008110/jquery-tabs-spinner-option-not-working

najmeddine
Thanks for that... That sucks though, cause Im using asp.net mvcHTML.ActionLink... so how am I supposed to add a <span>?
NachoF
A: 

You need to give it html to show... should be something like:

$('#tab').tabs({
        spinner: '<img src="/images/spinner.gif" />'
});

From the docs:

The HTML content of this string is shown in a tab title while remote content is loading. Pass in empty string to deactivate that behavior. Code examples

Initialize a tabs with the spinner option specified.

$('.selector').tabs({ spinner: 'Retrieving data...' });

Get or set the spinner option, after init.

//getter
var spinner = $('.selector').tabs('option', 'spinner');
//setter
$('.selector').tabs('option', 'spinner', 'Retrieving data...');
fiXedd