File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 13
13
< link rel ='stylesheet ' href ='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css ' integrity ='sha512-SbiR/eusphKoMVVXysTKG/7VseWii+Y3FdHrt0EpKgpToZeemhqHeZeLWLhJutz/2ut2Vw1uQEj2MbRF+TVBUA== ' crossorigin ='anonymous '/>
14
14
15
15
<!-- CUSTOM CSS -->
16
- < link rel ="stylesheet " href ="./css/style.css ">
16
+ < link rel ="stylesheet " href ="">
17
17
18
18
< title > Carosello Mono Array</ title >
19
19
</ head >
Original file line number Diff line number Diff line change @@ -4,22 +4,27 @@ const msThumbs = document.querySelector('.ms-thumbnails');
4
4
const msBtnFwd = document . querySelector ( '.ms-slider-controller.forward' ) ;
5
5
const msBtnBwd = document . querySelector ( '.ms-slider-controller.backward' ) ;
6
6
const msBtnCss = document . querySelector ( '.ms-wrapper .css-btn' ) ;
7
- const basicCss = "http://127.0.0.1:5500/css/style.css" ;
8
- const bonusCss = "http://127.0.0.1:5500/css/style-bonus.css" ;
7
+ const basicCss = "./css/style.css" ;
8
+ const bonusCss = "./css/style-bonus.css" ;
9
+ let displayBonus = false ;
9
10
10
11
const cssLink = document . getElementsByTagName ( 'link' ) ;
11
12
13
+ cssLink [ 3 ] . href = basicCss ;
14
+
12
15
msBtnCss . addEventListener ( 'click' , function ( ) {
13
- if ( cssLink [ 3 ] . href === basicCss ) {
16
+ if ( ! displayBonus ) {
14
17
msBtnCss . innerHTML = 'display basic style' ;
15
18
cssLink [ 3 ] . href = bonusCss ;
19
+ displayBonus = ! displayBonus ;
16
20
} else {
17
21
msBtnCss . innerHTML = 'display bonus style' ;
18
22
cssLink [ 3 ] . href = basicCss ;
23
+ displayBonus = ! displayBonus ;
19
24
}
20
25
} ) ;
21
26
22
- console . log ( cssLink [ 3 ] , msBtnCss , ( cssLink [ 3 ] . href === basicCss ) ) ;
27
+ console . log ( cssLink [ 3 ] , msBtnCss ) ;
23
28
24
29
let imgCounter = 0 ;
25
30
You can’t perform that action at this time.
0 commit comments