File tree 13 files changed +10
-21
lines changed
13 files changed +10
-21
lines changed Original file line number Diff line number Diff line change 22
22
var headers = document . querySelectorAll ( ".accordionHeader" ) ;
23
23
for ( var i = 0 ; i < headers . length ; i ++ ) {
24
24
headers [ i ] . addEventListener ( 'click' , function ( ) {
25
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
26
25
var p = this . getAttribute ( "aria-controls" ) ;
27
- document . getElementById ( p ) . classList . toggle ( "open" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
26
+ document . getElementById ( p ) . classList . toggle ( "open" ) ;
28
27
if ( this . getAttribute ( 'aria-expanded' ) === "false" ) {
29
28
this . setAttribute ( 'aria-expanded' , "true" ) ;
30
29
} else {
Original file line number Diff line number Diff line change 22
22
var headers = document . querySelectorAll ( ".accordionHeader" ) ;
23
23
for ( var i = 0 ; i < headers . length ; i ++ ) {
24
24
headers [ i ] . addEventListener ( 'click' , function ( ) {
25
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
26
25
var p = this . dataset . expand ;
27
- document . getElementById ( p ) . classList . toggle ( "open" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
26
+ document . getElementById ( p ) . classList . toggle ( "open" ) ;
28
27
this . classList . toggle ( "open" ) ;
29
28
} ) ;
30
29
}
Original file line number Diff line number Diff line change 40
40
for ( var i = 0 ; i < checkboxes . length ; i ++ ) {
41
41
checkboxes [ i ] . addEventListener ( 'click' , function ( ) {
42
42
/* note that aria boolean attributes are still *strings*, so can't use boolean logic */
43
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
44
43
if ( this . getAttribute ( 'aria-checked' ) === "true" ) {
45
44
this . setAttribute ( 'aria-checked' , "false" ) ;
46
45
} else {
Original file line number Diff line number Diff line change 37
37
var checkboxes = document . querySelectorAll ( ".checkbox" ) ;
38
38
for ( var i = 0 ; i < checkboxes . length ; i ++ ) {
39
39
checkboxes [ i ] . addEventListener ( 'click' , function ( ) {
40
- this . classList . toggle ( "checked" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
40
+ this . classList . toggle ( "checked" ) ;
41
41
/* note that dataset boolean attributes are still *strings*, so can't use boolean logic */
42
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
43
42
if ( this . dataset . checked === "true" ) {
44
43
this . dataset . checked = "false" ;
45
44
} else {
Original file line number Diff line number Diff line change 25
25
window . addEventListener ( 'load' , function ( ) {
26
26
var b = document . getElementById ( "b" ) ;
27
27
b . addEventListener ( 'click' , function ( ) {
28
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
29
28
var p = this . getAttribute ( 'aria-controls' ) ;
30
- document . getElementById ( p ) . classList . toggle ( "show" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
29
+ document . getElementById ( p ) . classList . toggle ( "show" ) ;
31
30
if ( this . getAttribute ( 'aria-expanded' ) === "false" ) {
32
31
this . setAttribute ( 'aria-expanded' , "true" ) ;
33
32
} else {
Original file line number Diff line number Diff line change 21
21
window . addEventListener ( 'load' , function ( ) {
22
22
var b = document . getElementById ( "b" ) ;
23
23
b . addEventListener ( 'click' , function ( ) {
24
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
25
24
var p = this . getAttribute ( 'aria-controls' ) ;
26
- document . getElementById ( p ) . classList . toggle ( "show" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
25
+ document . getElementById ( p ) . classList . toggle ( "show" ) ;
27
26
if ( this . getAttribute ( 'aria-expanded' ) === "false" ) {
28
27
this . setAttribute ( 'aria-expanded' , "true" ) ;
29
28
} else {
Original file line number Diff line number Diff line change 21
21
window . addEventListener ( 'load' , function ( ) {
22
22
var b = document . getElementById ( "b" ) ;
23
23
b . addEventListener ( 'click' , function ( ) {
24
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
25
24
var p = this . dataset . expand ;
26
- document . getElementById ( p ) . classList . toggle ( "show" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
25
+ document . getElementById ( p ) . classList . toggle ( "show" ) ;
27
26
this . classList . toggle ( "toggled" ) ;
28
27
} ) ;
29
28
} )
Original file line number Diff line number Diff line change 34
34
for ( var i = 0 ; i < radios . length ; i ++ ) {
35
35
radios [ i ] . addEventListener ( 'click' , function ( ) {
36
36
/* note that dataset boolean attributes are still *strings*, so can't use boolean logic */
37
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
38
-
39
37
/* if the radio button isn't already checked */
40
38
if ( this . getAttribute ( "aria-checked" ) === "false" ) {
41
39
/* loop through all radio buttons and make sure they're not checked */
Original file line number Diff line number Diff line change 34
34
for ( var i = 0 ; i < radios . length ; i ++ ) {
35
35
radios [ i ] . addEventListener ( 'click' , function ( ) {
36
36
/* note that dataset boolean attributes are still *strings*, so can't use boolean logic */
37
- /* IE11+ support - otherwise, use classic getAttribute/setAttribute */
38
-
39
37
/* if the radio button isn't already checked */
40
38
if ( this . dataset . checked === "false" ) {
41
39
/* loop through all radio buttons and make sure they're not checked */
Original file line number Diff line number Diff line change 22
22
this . querySelector ( ".label" ) . innerHTML = "Unmute" ;
23
23
}
24
24
25
- this . classList . toggle ( "toggled" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
25
+ this . classList . toggle ( "toggled" ) ;
26
26
} ) ;
27
27
} )
28
28
</ script >
Original file line number Diff line number Diff line change 18
18
} else {
19
19
this . setAttribute ( 'aria-pressed' , "true" ) ;
20
20
}
21
- this . classList . toggle ( "toggled" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
21
+ this . classList . toggle ( "toggled" ) ;
22
22
} ) ;
23
23
} )
24
24
</ script >
Original file line number Diff line number Diff line change 19
19
this . querySelector ( ".label" ) . innerHTML = "Unmute" ;
20
20
}
21
21
22
- this . classList . toggle ( "toggled" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
22
+ this . classList . toggle ( "toggled" ) ;
23
23
} ) ;
24
24
} )
25
25
</ script >
Original file line number Diff line number Diff line change 12
12
window . addEventListener ( 'load' , function ( ) {
13
13
var b = document . getElementById ( "b" ) ;
14
14
b . addEventListener ( 'click' , function ( ) {
15
- this . classList . toggle ( "toggled" ) ; /* IE10+ support only - otherwise, use more verbose method to setting/unsetting class */
15
+ this . classList . toggle ( "toggled" ) ;
16
16
} ) ;
17
17
} )
18
18
</ script >
You can’t perform that action at this time.
0 commit comments