1+ const p1namefield = document . getElementById ( 'p1name' ) ;
2+ const p2namefield = document . getElementById ( 'p2name' ) ;
13const p3namefield = document . getElementById ( 'p3name' ) ;
24const p4namefield = document . getElementById ( 'p4name' ) ;
35
46const startbtn = document . getElementById ( 'start' ) ;
7+ const vsspan = document . getElementById ( 'vsspan' ) ;
58
69document . getElementById ( 'gamemode1' ) . onclick = function ( ) {
10+
711 p3namefield . style . visibility = 'hidden' ;
812 p4namefield . style . visibility = 'hidden' ;
9- startbtn . style . top = "60%" ;
13+
14+ p1namefield . style . top = "0" ;
15+ p2namefield . style . top = "50%" ;
16+
17+ vsspan . style . top = "25%" ;
18+
19+ startbtn . style . top = "65%" ;
1020}
1121
1222document . getElementById ( 'gamemode2' ) . onclick = function ( ) {
23+
24+ p2namefield . style . top = "15%" ;
25+
26+ vsspan . style . top = "37%" ;
27+
1328 p3namefield . style . visibility = 'visible' ;
1429 p4namefield . style . visibility = 'visible' ;
15- startbtn . style . top = "80%" ;
30+
31+ p3namefield . style . top = "61%" ;
32+ p4namefield . style . top = "75%" ;
33+
34+ startbtn . style . top = "75%" ;
1635}
1736
1837startbtn . onclick = function ( ) {
@@ -27,6 +46,6 @@ startbtn.onclick=function(){
2746 sessionStorage . setItem ( 'p3name' , p3name ) ;
2847 sessionStorage . setItem ( 'p4name' , p4name ) ;
2948
30- window . location . href = 'https://kilsw1ch.github.io/Carrom-Counter/carrom.html' ;
31- // window.location.href = 'carrom.html';
49+ // window.location.href = 'https://kilsw1ch.github.io/Carrom-Counter/carrom.html';
50+ window . location . href = 'carrom.html' ;
3251}
0 commit comments