Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-07-24 11:48:45 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-07-24 11:48:45 +0400
commitc98b75c97949c34be62b63e79fa517347df35018 (patch)
treefdc1f3d76cd22801ea82c36f17426db72b52b7af /docs/assets/js/application.js
parente38fa4b1f40b8e8f64ad904fd5ea3d6d7ab9dffc (diff)
added fade out on scroll - we can pull this if you prefer it
Diffstat (limited to 'docs/assets/js/application.js')
-rw-r--r--docs/assets/js/application.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index 9f1fa704f3..e096f08665 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -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()