diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-01-10 12:35:01 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-01-10 12:35:01 +0000 |
commit | db738053ca93dbc3e7f501d82952ca2704e8a2d8 (patch) | |
tree | 338264234ccf82f25fae559f3080fe49ba46311c /ui/ui.tabs.js | |
parent | 71a97f2561d6208e7d0b713909930e15b4da7c81 (diff) | |
download | jquery-ui-db738053ca93dbc3e7f501d82952ca2704e8a2d8.tar.gz jquery-ui-db738053ca93dbc3e7f501d82952ca2704e8a2d8.zip |
UI Tabs: allow initializing an empty list, fixes #3683
Diffstat (limited to 'ui/ui.tabs.js')
-rw-r--r-- | ui/ui.tabs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index 4a6f93997..9d69c156c 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -150,7 +150,7 @@ $.widget("ui.tabs", { // highlight selected tab this.$panels.addClass(o.hideClass); this.$lis.removeClass(o.selectedClass); - if (o.selected !== null) { + if (o.selected !== null && this.$tabs.length) { // check for length avoids error when initializing empty list this.$panels.eq(o.selected).removeClass(o.hideClass); var classes = [o.selectedClass]; if (o.deselectable) classes.push(o.deselectableClass); |