From e9eff0cbffdd4381ee990e6fc78bee6caec92a00 Mon Sep 17 00:00:00 2001 From: fat Date: Wed, 19 Dec 2012 22:37:41 -0800 Subject: [PATCH] wait 100ms before engaging affix (allows for initial browser scroll) --- docs/assets/js/application.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 1f7282b666..ba77673000 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -14,12 +14,14 @@ }) // side bar - $('.bs-docs-sidenav').affix({ - offset: { - top: function () { return $window.width() <= 980 ? 290 : 210 } - , bottom: 270 - } - }) + setTimeout(function () { + $('.bs-docs-sidenav').affix({ + offset: { + top: function () { return $window.width() <= 980 ? 290 : 210 } + , bottom: 270 + } + }) + }, 100) // make code pretty window.prettyPrint && prettyPrint()