1(function($) { 2 var mobile_sticky = false; 3 $.fn.dexpsticky = function(e) { 4 this.each(function() { 5 var b = $(this); 6 b.addClass('dexp-sticky'); 7 b.data('offset-top', b.data('offset-top') || b.offset().top); 8 b.data('max-height', b.outerHeight()); 9 var c = $('<div>').addClass('sticky-wrapper'); 10 b.wrap(c); 11 var d = b.parents('.sticky-wrapper'); 12 b.width(d.width()); 13 setInterval(function() { 14 d.height(b.outerHeight()); 15 b.width(d.width()); 16 }, 50); 17 var scrollTimeout; 18 var delay = 15; 19 var scrollHandler = function() { 20 if(mobile_sticky == false && $(window).width() < 992){ 21 return; 22 } 23 if ($(window).scrollTop() > b.data('offset-top')) { 24 b.addClass('fixed'); 25 setTimeout(function() { 26 b.addClass('fixed-transition'); 27 }, 10); 28 } else { 29 b.removeClass('fixed'); 30 setTimeout(function() { 31 b.removeClass('fixed-transition'); 32 }, 10); 33 } 34 }; 35 $(window).bind('scroll', function() { 36 if(b.hasClass('fixed')){ 37 delay = 50; 38 }else{ 39 delay = 10; 40 } 41 if (scrollTimeout) { 42 clearTimeout(scrollTimeout); 43 scrollTimeout = null; 44 } 45 scrollTimeout = setTimeout(scrollHandler, 0); 46 }).bind('resize', function() { 47 b.removeClass('fixed fixed-transition').data('offset-top', b.offset().top); 48 $(window).scroll(); 49 }).scroll(); 50 }); 51 }; 52 $(window).on('load',function() { 53 if(!$('body').hasClass('menu-left') && !$('body').hasClass('menu-right')){ 54 $('.dexp-sticky').dexpsticky(); 55 } 56 }); 57}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.