diff options
| author | Francesco Pontillo <francescopontillo@gmail.com> | 2013-03-02 09:42:51 +0100 |
|---|---|---|
| committer | Francesco Pontillo <francescopontillo@gmail.com> | 2013-03-02 09:42:51 +0100 |
| commit | 13418ac9e709c85cfbaba501efb69c8bdff7ddd4 (patch) | |
| tree | e148a9d633a6d3832be7746d182d3798d64f4cb8 /swatchmaker/test | |
| parent | 939372574745e895c172f21e1fe3994946fbf760 (diff) | |
| parent | 9f0a62f7c12c8b91cef0df8189db38711838a051 (diff) | |
Merge branch 'gh-pages' of git://github.com/thomaspark/bootswatch into gh-pages
Conflicts:
component.json
package.json
Diffstat (limited to 'swatchmaker/test')
| -rwxr-xr-x | swatchmaker/test/application.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/swatchmaker/test/application.js b/swatchmaker/test/application.js deleted file mode 100755 index 8daeebf6..00000000 --- a/swatchmaker/test/application.js +++ /dev/null @@ -1,35 +0,0 @@ -(function ($) { - - $(function(){ - - // fix sub nav on scroll - var $win = $(window), - $body = $('body'), - $nav = $('.subnav'), - navHeight = $('.navbar').first().height(), - subnavHeight = $('.subnav').first().height(), - subnavTop = $('.subnav').length && $('.subnav').offset().top - navHeight, - marginTop = parseInt($body.css('margin-top'), 10); - isFixed = 0; - - processScroll(); - - $win.on('scroll', processScroll); - - function processScroll() { - var i, scrollTop = $win.scrollTop(); - - if (scrollTop >= subnavTop && !isFixed) { - isFixed = 1; - $nav.addClass('subnav-fixed'); - $body.css('margin-top', marginTop + subnavHeight + 'px'); - } else if (scrollTop <= subnavTop && isFixed) { - isFixed = 0; - $nav.removeClass('subnav-fixed'); - $body.css('margin-top', marginTop + 'px'); - } - } - - }); - -})(window.jQuery);
\ No newline at end of file |
