diff options
author | David Petersen <public@petersendidit.com> | 2011-03-27 17:02:58 -0400 |
---|---|---|
committer | David Petersen <public@petersendidit.com> | 2011-03-27 17:02:58 -0400 |
commit | 8b0c3618bdebddd98d4c09e77d14c50c4f4d3190 (patch) | |
tree | fac0a02d089d9ce25158f14bf5bbde22d9797d0c /tests/unit/tabs/tabs_deprecated.js | |
parent | 787efd307aff11ad3c51a72f520c58b8158ae973 (diff) | |
download | jquery-ui-8b0c3618bdebddd98d4c09e77d14c50c4f4d3190.tar.gz jquery-ui-8b0c3618bdebddd98d4c09e77d14c50c4f4d3190.zip |
Tabs: Rename select event to beforeActivate. Fixes #7136 Tabs: Rename select event to beforeActivate
Diffstat (limited to 'tests/unit/tabs/tabs_deprecated.js')
-rw-r--r-- | tests/unit/tabs/tabs_deprecated.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/tabs/tabs_deprecated.js b/tests/unit/tabs/tabs_deprecated.js index ba1a778b0..38fa6db71 100644 --- a/tests/unit/tabs/tabs_deprecated.js +++ b/tests/unit/tabs/tabs_deprecated.js @@ -188,6 +188,27 @@ test('show', function() { }); +test('select', function() { + expect(7); + + var eventObj; + el = $('#tabs1').tabs({ + select: function(event, ui) { + ok(true, 'select triggered after initialization'); + equals(this, el[0], "context of callback"); + equals(event.type, 'tabsselect', 'event type in callback'); + equals(ui.tab, el.find('a')[1], 'contain tab as DOM anchor element'); + equals(ui.panel, el.find('div')[1], 'contain panel as DOM div element'); + equals(ui.index, 1, 'contain index'); + evenObj = event; + } + }); + el.tabs('select', 1); + + el.find( "li:eq(1) a" ).simulate( "click" ); + equals( evenObj.originalEvent.type, "click", "select triggered by click" ); +}); + module("tabs (deprecated): methods"); test('add', function() { |