0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge branch '2.1.0-wip' of github.com:twitter/bootstrap into 2.1.0-wip

This commit is contained in:
Mark Otto 2012-07-24 01:53:45 -07:00
commit fa6a131eb6

View File

@ -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()