Commit e9169b7 1 parent edb485a commit e9169b7 Copy full SHA for e9169b7
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ <h1>Welcome to GetByeBye</h1>
43
43
< p > Protect your digital privacy. Learn how to detect and remove stalkerware from your phone.</ p >
44
44
45
45
< button class ="btn " id ="scrollToForm "> Get Updates</ button >
46
- < a href ="quiz.html " class ="btn " style ="text-decoration: none; "> Take the "Am I Being Tracked?" Quiz</ a >
46
+ < a href ="quiz.html " style =" text-decoration: none; color: #0f0; " class ="btn " style ="text-decoration: none; "> Take the "Am I Being Tracked?" Quiz</ a >
47
47
48
48
< div id ="email-form " style ="margin-top: 40px; ">
49
49
< h2 style ="color:#0f0; "> Stay Updated</ h2 >
@@ -57,7 +57,13 @@ <h2 style="color:#0f0;">Stay Updated</h2>
57
57
58
58
< script >
59
59
document . getElementById ( "scrollToForm" ) . addEventListener ( "click" , function ( ) {
60
- document . getElementById ( "email-form" ) . scrollIntoView ( { behavior : "smooth" , block : "center" } ) ;
60
+ const formElement = document . getElementById ( "email-form" ) ;
61
+ if ( formElement ) {
62
+ formElement . scrollIntoView ( { behavior : "smooth" , block : "start" } ) ;
63
+ } else {
64
+ console . error ( "Element #email-form not found" ) ;
65
+ }
66
+ } ) ;
61
67
} ) ;
62
68
} ) ;
63
69
</ script >
You can’t perform that action at this time.
0 commit comments