mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
tabs: core ajax unit test - more refactoring, seems IE7 needs a quick setTimeout for the first async test to work on first load
This commit is contained in:
parent
178c3b5b6e
commit
9ba45f3b76
@ -35,21 +35,21 @@ test('ajax', function() {
|
||||
selected: 2,
|
||||
load: function() {
|
||||
// spinner: default spinner
|
||||
start();
|
||||
stop();
|
||||
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
||||
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
||||
el.tabs('destroy');
|
||||
el.tabs({
|
||||
selected: 2,
|
||||
spinner: '<img src="spinner.gif" alt="">',
|
||||
load: function() {
|
||||
// spinner: image
|
||||
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
||||
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
||||
start();
|
||||
}
|
||||
});
|
||||
setTimeout(function() {
|
||||
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
||||
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
||||
el.tabs('destroy');
|
||||
el.tabs({
|
||||
selected: 2,
|
||||
spinner: '<img src="spinner.gif" alt="">',
|
||||
load: function() {
|
||||
// spinner: image
|
||||
equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
|
||||
equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
|
||||
start();
|
||||
}
|
||||
});
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user