@@ -16,7 +16,7 @@ test('init', function() {
16
16
ok ( $ ( 'div:eq(0)' , el ) . is ( '.ui-tabs-panel.ui-widget-content.ui-corner-bottom' ) , 'attach classes to panel' ) ;
17
17
ok ( $ ( 'li:eq(0)' , el ) . is ( '.ui-tabs-selected.ui-state-active.ui-corner-top' ) , 'attach classes to active li' ) ;
18
18
ok ( $ ( 'li:eq(1)' , el ) . is ( '.ui-state-default.ui-corner-top' ) , 'attach classes to inactive li' ) ;
19
- equals ( el . tabs ( 'option' , 'selected ' ) , 0 , 'selected option set' ) ;
19
+ equals ( el . tabs ( 'option' , 'active ' ) , 0 , 'active option set' ) ;
20
20
equals ( $ ( 'li' , el ) . index ( $ ( 'li.ui-tabs-selected' , el ) ) , 0 , 'second tab active' ) ;
21
21
equals ( $ ( 'div' , el ) . index ( $ ( 'div.ui-tabs-hide' , '#tabs1' ) ) , 1 , 'second panel should be hidden' ) ;
22
22
} ) ;
@@ -30,7 +30,7 @@ test('init with hash', function() {
30
30
//selection of tab with divs ordered differently than list
31
31
el = $ ( '#tabs1' ) . tabs ( ) ;
32
32
33
- equals ( el . tabs ( 'option' , 'selected ' ) , 1 , 'second tab should be selected ' ) ;
33
+ equals ( el . tabs ( 'option' , 'active ' ) , 1 , 'second tab should be active ' ) ;
34
34
35
35
ok ( ! $ ( '#tabs1 ul li:eq(0)' ) . is ( '.ui-tabs-selected.ui-state-active' ) , 'first tab should not be selected nor active' ) ;
36
36
ok ( $ ( '#tabs1 div:eq(0)' ) . is ( '.ui-tabs-hide' ) , 'first div for first tab should be hidden' ) ;
@@ -48,7 +48,7 @@ test('init mismatched order with hash', function() {
48
48
//selection of tab with divs ordered differently than list
49
49
el = $ ( '#tabs7' ) . tabs ( ) ;
50
50
51
- equals ( el . tabs ( 'option' , 'selected ' ) , 1 , 'second tab should be selected ' ) ;
51
+ equals ( el . tabs ( 'option' , 'active ' ) , 1 , 'second tab should be active ' ) ;
52
52
53
53
ok ( ! $ ( '#tabs7-list li:eq(0)' ) . is ( '.ui-tabs-selected.ui-state-active' ) , 'first tab should not be selected nor active' ) ;
54
54
ok ( $ ( '#tabs7 div:eq(1)' ) . is ( '.ui-tabs-hide' ) , 'second div for first tab should be hidden' ) ;
@@ -136,27 +136,27 @@ test('select', function() {
136
136
el = $ ( '#tabs1' ) . tabs ( ) ;
137
137
138
138
el . tabs ( 'select' , 1 ) ;
139
- equals ( el . tabs ( 'option' , 'selected ' ) , 1 , 'should select tab' ) ;
139
+ equals ( el . tabs ( 'option' , 'active ' ) , 1 , 'should select tab' ) ;
140
140
141
141
el . tabs ( 'destroy' ) ;
142
142
el . tabs ( { collapsible : true } ) ;
143
143
el . tabs ( 'select' , 0 ) ;
144
- equals ( el . tabs ( 'option' , 'selected ' ) , - 1 , 'should collapse tab passing in the already selected tab' ) ;
144
+ equals ( el . tabs ( 'option' , 'active ' ) , - 1 , 'should collapse tab passing in the already active tab' ) ;
145
145
146
146
el . tabs ( 'destroy' ) ;
147
147
el . tabs ( { collapsible : true } ) ;
148
148
el . tabs ( 'select' , - 1 ) ;
149
- equals ( el . tabs ( 'option' , 'selected ' ) , - 1 , 'should collapse tab passing in -1' ) ;
149
+ equals ( el . tabs ( 'option' , 'active ' ) , - 1 , 'should collapse tab passing in -1' ) ;
150
150
151
151
el . tabs ( 'destroy' ) ;
152
152
el . tabs ( ) ;
153
153
el . tabs ( 'select' , 0 ) ;
154
- equals ( el . tabs ( 'option' , 'selected ' ) , 0 , 'should not collapse tab if collapsible is not set to true' ) ;
154
+ equals ( el . tabs ( 'option' , 'active ' ) , 0 , 'should not collapse tab if collapsible is not set to true' ) ;
155
155
el . tabs ( 'select' , - 1 ) ;
156
- equals ( el . tabs ( 'option' , 'selected ' ) , 0 , 'should not collapse tab if collapsible is not set to true' ) ;
156
+ equals ( el . tabs ( 'option' , 'active ' ) , 0 , 'should not collapse tab if collapsible is not set to true' ) ;
157
157
158
158
el . tabs ( 'select' , '#fragment-2' ) ;
159
- equals ( el . tabs ( 'option' , 'selected ' ) , 1 , 'should select tab by id' ) ;
159
+ equals ( el . tabs ( 'option' , 'active ' ) , 1 , 'should select tab by id' ) ;
160
160
} ) ;
161
161
162
162
test ( 'refresh' , function ( ) {
@@ -165,7 +165,7 @@ test('refresh', function() {
165
165
var el = $ ( '<div id="tabs"><ul></ul></div>' ) . tabs ( ) ,
166
166
ul = el . find ( 'ul' ) ;
167
167
168
- equals ( el . tabs ( 'option' , 'selected ' ) , - 1 , 'Initially empty, no selected tab' ) ;
168
+ equals ( el . tabs ( 'option' , 'active ' ) , - 1 , 'Initially empty, no active tab' ) ;
169
169
170
170
ul . append ( '<li><a href="data/test.html">Test 1</a></li>' ) ;
171
171
el . tabs ( 'refresh' ) ;
@@ -179,12 +179,12 @@ test('refresh', function() {
179
179
$ ( '<div id="test1">Test Panel 1</div>' ) . insertAfter ( ul ) ;
180
180
el . tabs ( 'refresh' ) ;
181
181
el . tabs ( 'select' , 0 ) ;
182
- equals ( el . tabs ( 'option' , 'selected ' ) , 0 , 'First tab added should be auto selected ' ) ;
182
+ equals ( el . tabs ( 'option' , 'active ' ) , 0 , 'First tab added should be auto active ' ) ;
183
183
184
184
ul . append ( '<li><a href="#test2">Test 2</a></li>' ) ;
185
185
$ ( '<div id="test2">Test Panel 2</div>' ) . insertAfter ( ul ) ;
186
186
el . tabs ( 'refresh' ) ;
187
- equals ( el . tabs ( 'option' , 'selected ' ) , 0 , 'Second tab added should not be auto selected ' ) ;
187
+ equals ( el . tabs ( 'option' , 'active ' ) , 0 , 'Second tab added should not be auto active ' ) ;
188
188
} ) ;
189
189
190
190
test ( 'load' , function ( ) {
0 commit comments