diff options
author | Thomas Park <thomas@thomaspark.me> | 2014-12-08 19:02:30 -0500 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.me> | 2014-12-08 19:02:30 -0500 |
commit | 7da2e905dfa8b9985fad3ff714afc62b1b9ff20d (patch) | |
tree | 1c0b3fd277d3c603d757224e4c2da7352b3a83cf /assets/js | |
parent | 68294f9cbc5b425a649524feaacf1c21f1f27446 (diff) | |
parent | c67be618a8dc9955e3be22c03cfb74812d09c162 (diff) |
Merge pull request #374 from jenil27/splash
Redesign front-page
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/bootswatch.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/assets/js/bootswatch.js b/assets/js/bootswatch.js index 93f1d4ef..9a32eee5 100644 --- a/assets/js/bootswatch.js +++ b/assets/js/bootswatch.js @@ -1,4 +1,14 @@ (function(){ + $(window).scroll(function () { + var top = $(document).scrollTop(); + $('.splash').css({ + 'background-position': '0px -'+(top/3).toFixed(2)+'px' + }); + if(top > 50) + $('#home > .navbar').removeClass('navbar-transparent'); + else + $('#home > .navbar').addClass('navbar-transparent'); + }); var $button = $("<div id='source-button' class='btn btn-primary btn-xs'>< ></div>").click(function(){ var html = $(this).parent().html(); |