From 55f9c2cec0e48dc5190a1f81f297e469c2d5015b Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Tue, 6 Aug 2013 15:15:37 -0400 Subject: moves v2.3.2 to /2/ --- swatchmaker/test/bootswatch.js | 43 ------------------------------------------ 1 file changed, 43 deletions(-) delete mode 100644 swatchmaker/test/bootswatch.js (limited to 'swatchmaker/test/bootswatch.js') diff --git a/swatchmaker/test/bootswatch.js b/swatchmaker/test/bootswatch.js deleted file mode 100644 index 5a9b3002..00000000 --- a/swatchmaker/test/bootswatch.js +++ /dev/null @@ -1,43 +0,0 @@ -$('a[rel=tooltip]').tooltip({ - 'placement': 'bottom' -}); - - -$('.navbar a, .subnav a').smoothScroll(); - - -(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 -- cgit v1.2.3