2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

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

This commit is contained in:
Mark Otto
2013-07-26 00:04:24 -07:00
6 changed files with 60 additions and 25 deletions
+14 -3
View File
@@ -13,12 +13,23 @@
e.preventDefault()
})
// back to top
setTimeout(function () {
$('.bs-sidebar').affix({
var $sideBar = $('.bs-sidebar')
$sideBar.affix({
offset: {
top: function () { return $window.width() <= 980 ? 290 : 210 }
, bottom: 270
top: function () {
var offsetTop = $sideBar.offset().top
var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10)
var navOuterHeight = $('.bs-docs-nav').height()
return (this.top = offsetTop - navOuterHeight - sideBarMargin)
}
, bottom: function () {
return (this.bottom = $('.bs-footer').outerHeight(true))
}
}
})
}, 100)