1jQuery('document').ready(function ($){ 2 $('.menu-toggle').click(function () { 3 $('.main-navigation #primary-menu').slideToggle(); 4 }); 5 6 7 // Initialize gototop for carousel 8 if ( $('#toTop').length > 0 ) { 9 // Hide the toTop button when the page loads. 10 $("#toTop").css("display", "none"); 11 12 // This function runs every time the user scrolls the page. 13 $(window).scroll(function(){ 14 15 // Check weather the user has scrolled down (if "scrollTop()"" is more than 0) 16 if($(window).scrollTop() > 0){ 17 18 // If it's more than or equal to 0, show the toTop button. 19 $("#toTop").fadeIn("slow"); 20 } 21 else { 22 // If it's less than 0 (at the top), hide the toTop button. 23 $("#toTop").fadeOut("slow"); 24 25 } 26 }); 27 28 29 30 // When the user clicks the toTop button, we want the page to scroll to the top. 31 jQuery("#toTop").click(function(event){ 32 33 // Disable the default behaviour when a user clicks an empty anchor link. 34 // (The page jumps to the top instead of // animating) 35 event.preventDefault(); 36 37 // Animate the scrolling motion. 38 jQuery("html, body").animate({ 39 scrollTop:0 40 },"slow"); 41 42 }); 43 } 44 if ( jQuery('.ct-sticky-sidebar').length > 0 ) { 45//sticky sidebar 46 var at_body = $("body"); 47 var at_window = $(window); 48 49 if (at_body.hasClass('ct-sticky-sidebar')) { 50 if (at_body.hasClass('right-sidebar')) { 51 $('#secondary, #primary').theiaStickySidebar(); 52 } 53 else { 54 $('#secondary, #primary').theiaStickySidebar(); 55 } 56 } 57 } 58//slider for home page 59// if ( jQuery('.bxslider').length > 0 ) { 60// jQuery('.bxslider').show().bxSlider({ 61// minSlides: 5, 62// adaptiveHeight: 500, 63// slideMargin: 0, 64// pager: false, 65// auto: true, 66// }); 67// } 68 if ( jQuery('.ct-carousel').length > 0 ) { 69 $(".ct-carousel").slick({ 70 dots: false, 71 infinite: true, 72 slidesToShow: 3, 73 slidesToScroll: 3, 74 responsive: [ 75 { 76 breakpoint: 1023, 77 settings: { 78 slidesToShow: 2, 79 slidesToScroll: 2 80 } 81 }, 82 { 83 breakpoint: 700, 84 settings: { 85 slidesToShow: 1, 86 slidesToScroll: 1 87 } 88 } 89 // You can unslick at a given breakpoint now by adding: 90 // settings: "unslick" 91 // instead of a settings object 92 ] 93 }); 94 } 95 96 if ( jQuery('.sticky-header').length > 0 ) { 97 // grab the initial top offset of the navigation 98 var stickyNavTop = $('.sticky-header').offset().top; 99 100 // our function that decides weather the navigation bar should have "fixed" css position or not. 101 var stickyNav = function () { 102 var width = $(window).width(); 103 var scrollTop = $(window).scrollTop(); // our current vertical position from the top 104 105 // if we've scrolled more than the navigation, change its position to fixed to stick to top, 106 // otherwise change it back to relative 107 if ((scrollTop > stickyNavTop) && (width > 768)) { 108 $('.sticky-header').addClass('ct-sticky'); 109 $('.sticky-header').removeClass('hide'); 110 } else { 111 $('.sticky-header').removeClass('ct-sticky'); 112 $('.sticky-header').addClass('hide'); 113 } 114 }; 115 116 stickyNav(); 117 // and run it again every time you scroll 118 $(window).scroll(function () { 119 stickyNav(); 120 }); 121 } 122 123}); 124 125jQuery(window).load(function($) { 126 if ( jQuery('.gist-masonry-container').length > 0 ) { 127 var $container = jQuery('.gist-masonry-container'); 128 // initialize 129 $container.masonry({
130 itemSelector: '.gist-masonry-block', 131 columnWidth: '.gist-masonry-block', 132 percentPosition: true 133 }); 134 } 135});
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.