Commit c98b75c9 authored by Jacob Thornton's avatar Jacob Thornton
Browse files

added fade out on scroll - we can pull this if you prefer it

parent e38fa4b1
6 merge requests!4427Use variable for desktop media query,!4258Aria,!4248Amended mentions of 'javascript' to the correct 'JavaScript',!4235Patch 1,!4232Fixing the modal z-index issue + make modal stacking possible,!42132.1.0 wip
Showing with 11 additions and 0 deletions
+11 -0
......@@ -6,6 +6,17 @@
$(function(){
// fancy fade jumbotron
var $jumbotron = $('.jumbotron')
, $jcontainer = $('.jumbotron .container')
, opacRatio = ($jumbotron.height() / 200 ) * 2
$(window).on('scroll', function () {
var diff = 100 - ($(window).scrollTop() / opacRatio)
$jcontainer.css({ opacity: (diff > 0 ? Math.min(diff, 100) : 0) / 100 })
})
// Disable certain links in docs
$('section [href^=#]').click(function (e) {
e.preventDefault()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment