File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
- $ ( document ) . ready ( function ( ) {
1
+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
2
2
const productSelectorContent = document . getElementById ( "product-selector" ) ;
3
+ const productSelectorButton = document . getElementById ( "product-selector-button" ) ;
3
4
4
- $ ( "#product-selector-button" ) . on ( "click" , ( ) => {
5
+ productSelectorButton . addEventListener ( "click" , function ( ) {
5
6
if ( productSelectorContent . style . display === "block" ) {
6
7
productSelectorContent . style . display = "none" ;
7
8
} else {
8
9
productSelectorContent . style . display = "block" ;
9
10
}
10
11
} ) ;
11
12
12
- window . onclick = function ( event ) {
13
+ window . addEventListener ( "click" , function ( event ) {
13
14
if ( ! event . target . matches ( '#product-selector-button' ) && ! event . target . matches ( '#product-selector-button-icon' ) ) {
14
- productSelectorContent . style . display = "none"
15
+ productSelectorContent . style . display = "none" ;
15
16
}
16
- }
17
- } )
17
+ } ) ;
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments