Sha256: f42dc5bb26d00f73963235ccec321c481bf6425aa74ac039150f1363ec4b31e1
Contents?: true
Size: 810 Bytes
Versions: 2
Compression:
Stored size: 810 Bytes
Contents
!function( $ ) { $(function () { // fix sub nav on scroll var $win = $(window) , $bar = $('header hr') , barTop = $('header hr').length && $('header hr').offset().top - 58 , isFixed = 0 function processScroll() { var i, scrollTop = $win.scrollTop() if (scrollTop >= barTop && !isFixed) { isFixed = 1 $bar.addClass('bar-fixed') } else if (scrollTop <= barTop && isFixed) { isFixed = 0 $bar.removeClass('bar-fixed') } } if (!$("header .navbar").hasClass("navbar-fixed-top")) { // Navbar is static, bar should be too } else if ($("header #featured")[0]) { processScroll() $win.on('scroll', processScroll) } else { $bar.addClass('bar-fixed') } }) }( window.jQuery )
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kiso_themes-1.0.2 | app/assets/javascripts/kiso_themes/header.js |
kiso_themes-1.0.2 | lib/generators/kiso_themes/templates/rails6/kiso_themes/header.js |