File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ <h3>Contact me: <a href="mailto:
[email protected] "><i class="fa fa-envelope"
120120 < a href ="https://github.com/billdevcode " target ="_blank " alt ="Github "> < img src ="imgs/github-icon.png " width ="50 " height ="50 " class ="img-circle "> </ a >
121121 </ div >
122122 < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js " integrity ="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa " crossorigin ="anonymous "> </ script >
123+ < script src ="src/index.js "> </ script >
123124 </ body >
124125
125126</ html >
Original file line number Diff line number Diff line change 1+ $ ( document ) . ready ( function ( ) {
2+
3+ $ ( window ) . on ( "scroll" , function ( ) {
4+ var scrollHeight = $ ( document ) . height ( ) ;
5+ var scrollPosition = $ ( window ) . height ( ) + $ ( window ) . scrollTop ( ) ;
6+ var checkPosition = false ;
7+
8+ if ( scrollPosition >= 1520 && ! checkPosition ) {
9+ $ ( "#navbar" ) . css ( "background-color" , "#222" ) ;
10+ checkPosition = true ;
11+ } else if ( scrollPosition < 1520 ) {
12+ $ ( "#navbar" ) . css ( "background-color" , "transparent" ) ;
13+ checkPosition = false ;
14+ }
15+ } ) ;
16+
17+
18+
19+ } )
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ html, body {
33 overflow-x : hidden !important ;
44}
55
6+ # navbar {
7+ background-color : transparent;
8+ }
69.navbar-header .navbar {
710 text-decoration : none;
811 max-width : 100% ;
@@ -12,6 +15,12 @@ html, body {
1215 font-family : 'open sans' ;
1316}
1417
18+ # navbar {
19+ background-color : transparent;
20+ -webkit-transition : all 0.8s ease;
21+ transition : all 0.8s ease;
22+ }
23+
1524.home {
1625 height : 650px ;
1726 background-image : url ('../imgs/bg1.jpg' );
You can’t perform that action at this time.
0 commit comments