diff options
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/js/application.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 3319e607d..ddf6b7b9a 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -1,10 +1,22 @@ $(document).ready(function(){ + // Google code prettify + // ================ + + // cache $(window), as it is used in scroll spy logic later on + var $window = $(window); + + $window.load(function() { + // prettyPrint cannot be set as the event handler to load directly; see + // http://google-code-prettify.googlecode.com/svn/trunk/README.html + prettyPrint(); + }); + + // scroll spy logic // ================ var activeTarget, - $window = $(window), position = {}, nav = $('body > .topbar li a'), targets = nav.map(function () { @@ -127,4 +139,4 @@ $(document).ready(function(){ }); -});
\ No newline at end of file +}); |
