Sha256: fbc0bca4cc69475f9795427af76c2353ec8689460fca1fad2d61100cc0f426ef
Contents?: true
Size: 488 Bytes
Versions: 11
Compression:
Stored size: 488 Bytes
Contents
(function($){ var $window = $(window); var $content = $(".style-guide-content"); var $sideBar = $(".style-guide-sidebar"); var contentTop = $content.offset().top; function adjustScroll() { var windowScrollTop = $window.scrollTop(); if (windowScrollTop > contentTop) { $sideBar.addClass("style-guide-fixed"); } else { $sideBar.removeClass("style-guide-fixed"); } } $window.scroll(function(){ setTimeout(adjustScroll, 1); }); })(window.jQuery);
Version data entries
11 entries across 11 versions & 1 rubygems