1jQuery(document).ready(function($) { 2 3 if(clean_gallery_ajax_object.primary_menu_active){ 4 5 if(clean_gallery_ajax_object.sticky_menu){ 6 // grab the initial top offset of the navigation 7 var clean_gallery_sticky_navtop = $('.clean-gallery-primary-menu-container').offset().top; 8 9 // our function that decides weather the navigation bar should have "fixed" css position or not. 10 var clean_gallery_sticky_nav = function(){ 11 var clean_gallery_scroll_top = $(window).scrollTop(); // our current vertical position from the top 12 13 // if we've scrolled more than the navigation, change its position to fixed to stick to top, 14 // otherwise change it back to relative 15 16 if(clean_gallery_ajax_object.sticky_menu_mobile){ 17 if (clean_gallery_scroll_top > clean_gallery_sticky_navtop) { 18 $('.clean-gallery-primary-menu-container').addClass('clean-gallery-fixed'); 19 } else { 20 $('.clean-gallery-primary-menu-container').removeClass('clean-gallery-fixed'); 21 } 22 } else { 23 if(window.innerWidth > 1206) { 24 if (clean_gallery_scroll_top > clean_gallery_sticky_navtop) { 25 $('.clean-gallery-primary-menu-container').addClass('clean-gallery-fixed'); 26 } else { 27 $('.clean-gallery-primary-menu-container').removeClass('clean-gallery-fixed'); 28 } 29 } 30 } 31 }; 32 33 clean_gallery_sticky_nav(); 34 // and run it again every time you scroll 35 $(window).scroll(function() { 36 clean_gallery_sticky_nav(); 37 }); 38 } 39 40 $(".clean-gallery-nav-primary .clean-gallery-primary-nav-menu").addClass("clean-gallery-primary-responsive-menu"); 41 42 $(".clean-gallery-primary-responsive-menu-icon").click(function(){ 43 $(this).next(".clean-gallery-nav-primary .clean-gallery-primary-nav-menu").slideToggle(); 44 }); 45 46 $(window).resize(function(){ 47 if(window.innerWidth > 1206) { 48 $(".clean-gallery-nav-primary .clean-gallery-primary-nav-menu, nav .sub-menu, nav .children").removeAttr("style"); 49 $(".clean-gallery-primary-responsive-menu > li").removeClass("clean-gallery-primary-menu-open"); 50 } 51 }); 52 53 $(".clean-gallery-primary-responsive-menu > li").click(function(event){ 54 if (event.target !== this) 55 return; 56 $(this).find(".sub-menu:first").toggleClass('clean-gallery-submenu-toggle').parent().toggleClass("clean-gallery-primary-menu-open"); 57 $(this).find(".children:first").toggleClass('clean-gallery-submenu-toggle').parent().toggleClass("clean-gallery-primary-menu-open"); 58 }); 59 60 $("div.clean-gallery-primary-responsive-menu > ul > li").click(function(event) { 61 if (event.target !== this) 62 return; 63 $(this).find("ul:first").toggleClass('clean-gallery-submenu-toggle').parent().toggleClass("clean-gallery-primary-menu-open"); 64 }); 65 66 } 67 68 if(clean_gallery_ajax_object.backtotop_active){ 69 var scrollButtonEl = $( '.clean-gallery-scroll-top' ); 70 scrollButtonEl.hide(); 71 72 $( window ).scroll( function () { 73 if ( $( window ).scrollTop() < 20 ) { 74 $( '.clean-gallery-scroll-top' ).fadeOut(); 75 } else { 76 $( '.clean-gallery-scroll-top' ).fadeIn(); 77 } 78 } ); 79 80 scrollButtonEl.click( function () { 81 $( "html, body" ).animate( { scrollTop: 0 }, 300 ); 82 return false; 83 } ); 84 } 85 86 $(".clean-gallery-social-icon-search").on('click', function (e) { 87 e.preventDefault(); 88 $('.social-search-box').slideToggle(400); 89 }); 90 91 $(".entry-content").fitVids(); 92 93 if(clean_gallery_ajax_object.sticky_sidebar_active){ 94 $(".clean-gallery-sitemain-wrapper, .clean-gallery-sidebar-wrapper").theiaStickySidebar({ 95 // Settings 96 containerSelector: ".clean-gallery-site-content-inside", 97 additionalMarginTop: 0, 98 additionalMarginBottom: 0, 99 minWidth: 1206, 100 }); 101 102 $(window).on( "resize", function() { 103 $(".clean-gallery-sitemain-wrapper, .clean-gallery-sidebar-wrapper").theiaStickySidebar({ 104 // Settings 105 containerSelector: ".clean-gallery-site-content-inside", 106 additionalMarginTop: 0, 107 additionalMarginBottom: 0, 108 minWidth: 1206, 109 }); 110 }); 111 } 112 113 $(".clean-gallery-postbox-content").attr("tabindex",0); 114 115});
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.