Difference between revisions of "Template:British Columbia 2"

m
m
Line 68: Line 68:
 
}
 
}
  
 
+
.opaque-nav{
 +
  background-color: grey;
 +
}
  
 
</style>
 
</style>
 +
<script>
 +
// get the value of the bottom of the #main element by adding the offset of that element plus its height, set it as a variable
 +
var mainbottom = $(".cover").offset().top + $(".cover").height();
 +
 +
// on scroll,
 +
$(window).on("scroll",function(){
 +
 +
    // we round here to reduce a little workload
 +
    stop = Math.round($(window).scrollTop());
 +
    if (stop > mainbottom) {
 +
        $('.navbar-default').addClass('.opaque-nav');
 +
    } else {
 +
        $('.navbar-default').removeClass('.opaque-nav');
 +
    }
 +
 +
});
 +
</script>
 
</head>
 
</head>
 
<header>
 
<header>
Line 124: Line 143:
 
</header>
 
</header>
  
<body></body>
+
<body>
 +
<div class="cover">
 +
  <div class="container-fluid">
 +
    <div class="row" id="title">
 +
      <div class="col-sm-12">
 +
        <strong><p style="font-size: 3em">Eagles</p></strong>
 +
      </div>
 +
    </div><!--title-->
 +
  </div><!--container-fluid-->
 +
</div><!--cover-->
 +
<div class="content"></div>
 +
</body>
 
</html>
 
</html>

Revision as of 13:48, 3 October 2016

Home

Eagles