Sha256: 630be85edccacddb86cfe1c57e4060ceb142df197d89e210337a2b6ed63b395f
Contents?: true
Size: 713 Bytes
Versions: 13
Compression:
Stored size: 713 Bytes
Contents
//= require betterjs/twbs_ext/affix_2_1_0 jQuery(function() { $('#aside').affix({ offset: { top: function () { offset = getInt( $("body").css("padding-top") ); return (this.top = $("#aside").offset().top - offset) } } }); $('#aside_toggle').affix({ offset: { top: function () { if ( $("body").hasClass("fixed-nav") ) { var neededTop = $("#aside").offset().top - 50; } else { var neededTop = $("#aside").offset().top; } return (this.top = neededTop) } } }); $("body").on( "click", "#aside_toggle", function(e){ e.preventDefault(); $('body').toggleClass("with_aside"); }); });
Version data entries
13 entries across 13 versions & 1 rubygems