1// Generated by CoffeeScript 1.4.0 2/* 3Sticky Elements Shortcut for jQuery Waypoints - v2.0.2 4Copyright (c) 2011-2013 Caleb Troughton 5Dual licensed under the MIT license and GPL license. 6https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt 7*/ 8(function(){"use strict";(function(t,n){if(typeof define==="function"&&define.amd){return define(["jquery","waypoints"],n)}else{return n(t.jQuery)}})(this,function(t){var n,e;n={wrapper:'<div class="sticky-wrapper" />',stuckClass:"stuck"};e=function(n,e){n.wrap(e.wrapper);n.each(function(){var n;n=t(this);n.parent().css('min-height',n.outerHeight());return true});return n.parent()};return t.waypoints("extendFn","sticky",function(r){var i,a;r=t.extend({},t.fn.waypoint.defaults,n,r);i=e(this,r);a=r.handler;r.handler=function(n){var e,i;e=t(this).children(":first");i=n==="down"||n==="right";e.toggleClass(r.stuckClass,i);if(a!=null){return a.call(this,n)}};i.waypoint(r);return this})})}).call(this); 9 10 11(function($) { // run this code on page load (AKA DOM load) 12 13 "use strict"; 14 15 $(window).load(function() 16 { 17 var header_height = $('#header-wrap').outerHeight(), 18 minHeight = $(window).height() - header_height, 19 offset_value = - header_height; 20 21 if( $('#header-wrap').hasClass('layout_left') ) 22 { 23 offset_value = 0; 24 minHeight = 0; 25 } 26 27 // Menu 28 if( elements.menu == 1 ) 29 { 30 $('#header').not('.layout_left #header').waypoint('sticky', { 31 32 offset: offset_value 33 }); 34 } 35 36 // Sidebar 37 if( elements.sidebar == 1 ) 38 { 39 $('.acoda-sidebar .sidebar').waypoint('sticky', { 40 wrapper: false, 41 offset: offset_value 42 }); 43 44 $('.acoda-sidebar').css('min-height', minHeight ); 45 //$('.acoda-sidebar .sidebar.stuck').css('max-height', minHeight ); 46 } 47 }); 48 49 50 $( function () { 51 52 /* set variables locally for increased performance*/ 53 var displayed = false, 54 $message = $('#header,.sidebar.skinset-sidebar'), 55 $window = $(window); 56 57 /* react to scroll event on window*/ 58 $window.scroll( 59 60 function () 61 { 62 var top = $('.sticky-wrapper').height() + 100; 63 64 // Check page is not using acoda-page-animate 65 66 if( $window.scrollTop() <= top ) // hide if at the top of the page 67 { 68 if( $('#container').hasClass('transparent') ) 69 { 70 $('#header-wrap').addClass('transparent'); 71 } 72 73 $('.acoda-sidebar .sidebar').css({ 'top': 0,'height':'auto' }); 74 75 $message.removeClass('animate'); 76 77 //$('.dock-panel-wrap.dock_layout_2 .dock-panel-inner,.dock-panel-wrap.dock_layout_3 .dock-panel-inner').animate({top : 0 }); 78 79 displayed = false; 80 81 /*$message.removeClass('animate').delay(300).queue(function(transremove) 82 { 83 $message.removeClass('transition'); 84 85 transremove(); 86 87 //$(window).trigger('resize'); 88 });*/ 89 90 } 91 else if( displayed === false && $window.width() >= 1025 ) // show if scrolling down 92 { 93 if( $('#container').hasClass('transparent') ) 94 { 95 $('#header-wrap').removeClass('transparent'); 96 } 97 98 if( $message.hasClass('sidebar') && $('#header').hasClass('stuck') ) 99 { 100 101 $message.delay(300).queue(function(top) 102 { 103 var headerHeight = $('#header.stuck').outerHeight(), 104 minHeight = $(window).height() - headerHeight; 105 $('.acoda-sidebar .sidebar.stuck').animate({'top' : headerHeight,'height' : minHeight}, 300 ); 106 top(); 107 }); 108 109 } 110 111 112 $message.stop(true, true).delay(300).queue(function(animate) 113 { 114 $message.addClass('animate'); 115 animate(); 116 }); 117 118 119 displayed = true; 120 121 //$message.addClass('animate transition'); 122 //$('.dock-panel-wrap.dock_layout_2 .dock-panel-inner,.dock-panel-wrap.dock_layout_3 .dock-panel-inner').animate({top : $('#header-wrap').height() }, 300 ); 123 } 124 else if( displayed === false && $window.width() < 1025 ) // show if scrolling down 125 { 126 if( $('#container').hasClass('transparent') ) 127 { 128 $('#header-wrap').removeClass('transparent'); 129 } 130 131 displayed = true; 132 133 //$message.addClass('animate transition'); 134 //$('.dock-panel-wrap.dock_layout_2 .dock-panel-inner,.dock-panel-wrap.dock_layout_3 .dock-
134panel-inner').animate({top : $('#header-wrap').height() }, 300 ); 135 } 136 } 137 ); 138 139 }); 140 141})(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.