From dee57462e2805421a0fe0d786229446bbaef677b Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Tue, 14 Aug 2012 21:06:08 -0700 Subject: get affix actually working and update docs --- docs/assets/js/application.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/assets/js/application.js') diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 9f1fa704f..69760bee3 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -6,11 +6,21 @@ $(function(){ + var $window = $(window) + // Disable certain links in docs $('section [href^=#]').click(function (e) { e.preventDefault() }) + // side bar + $('.bs-docs-sidenav').affix({ + offset: { + top: function () { return $window.width() <= 980 ? 290 : 210 } + , bottom: 270 + } + }) + // make code pretty window.prettyPrint && prettyPrint() -- cgit v1.2.3