PageSourceSearch

https://cookfox.com/wp-content/themes/cookfox/js/cookfox.functions.js?ver=20140320

js cookfox.com collected 2026-10-02 04:03:22 UTC 5,505 bytes, 172 lines download raw bytes

1$ = jQuery;
2
3( function( $ ) {
4	
5
6	$( document ).ready(function() {
7
8
9		// blue dot back to top
10	    $(".back-to-top").click(function( event) {
11	      event.preventDefault();
12	       $('html, body').animate({
13	            scrollTop: 0
14	        }, 1000);
15	    });
16
17	    // hide blue dot (if not homepage) util we start scrolling
18	 //    if ( !$('body').hasClass('home')) {
19		//     $(".back-to-top").hide(); //hide your div initially
20		//     var topOfOthDiv = 100;
21		//     $(window).scroll(function() {
22		//         if($(window).scrollTop() > topOfOthDiv) { //scrolled past the other div?
23		//             $(".back-to-top").show(200); //reached the desired point -- show div
24		//         }
25		//         else if($(window).scrollTop() < topOfOthDiv) {
26		//         	$(".back-to-top").hide();
27		//         }
28		//     });
29		// }
30
31	    // search
32   		$(".search-nav").click(function( event) {
33	      	event.preventDefault();
34	      	$(this).toggleClass('open');
35	      	// $('header form.searchform').show("slide", { direction: "left" }, 1000);
36	      	$('header form.searchform').toggle( "slide" );
37	      	$('header form.searchform input[type=text]').focus();
38
39	      	// $('header form.searchform').hide("slide", { direction: "left" }, 1000);
40			// $('header form.searchform').show("slide", { direction: "left" }, 1000);
41	    });
42
43		// On before slide change
44	    $(".slideshow-container").on('afterChange', function(event, slick, currentSlide){
45	    	var extraclass = $(this).attr('data-indicator');
46	        if (currentSlide < 9) {
47	        	$('.slide-page-indicator.'+extraclass+' .current-page').text('O'+(currentSlide+1));
48	        } else {
49	        	var currentSlideString = (currentSlide +1).toString().replace("0", "O");
50	        	$('.slide-page-indicator.'+extraclass+' .current-page').text(currentSlideString);
51	        }
52	        if (slick.slideCount < 10) {
53	        	$('.slide-page-indicator.'+extraclass+' .total-pages').text('O'+slick.slideCount);
54	        } else {
55	        	var slideCountString = slick.slideCount.toString().replace("0", "O");
56	        	$('.slide-page-indicator.'+extraclass+' .total-pages').text(slideCountString);
57	        }
58
59	        
60	    });
61
62	    $(".slideshow-container").on('init', function(event, slick, currentSlide){
63	    	var extraclass = $(this).attr('data-indicator');
64	        
65	        if (slick.slideCount < 10) {
66	        	$('.slide-page-indicator.'+extraclass+' .total-pages').text('O'+slick.slideCount);
67	        } else {
68	        	var slideCountString = slick.slideCount.toString().replace("0", "O");
69	        	$('.slide-page-indicator.'+extraclass+' .total-pages').text(slideCountString);
70	        }
71	    });
72
73		$(".slideshow-container").slick({
74			infinite: true,
75			slidesToShow: 1,
76			slidesToScroll: 1,
77
78		});	  
79	  	// burger nav
80		$(".menu-toggle").click(function( event ) {
81			event.preventDefault();
82			$('.open-menu-containing-column').addClass('open');
83		});
84
85		$(".menu-close").click(function( event) {
86			event.preventDefault();
87			$('.open-menu-containing-column').removeClass('open');
88		});
89
90		// grid / list toggle
91		$(".view-icon").click(function( event ) {
92			event.preventDefault();
93			$('.view-icon').removeClass('active');
94			$(this).addClass('active');
95			if ($(this).hasClass('grid-view-icon')) {
96				$('.archive-items').addClass('item-grid');
97				$('.archive-items').removeClass('item-list');
98			} else {
99				$('.archive-items').addClass('item-list');
100				$('.archive-items').removeClass('item-grid');
101			}
102		});
103		var autoScrollComplete = false;
104		$('.slick-arrow').click(function (event) {
105			if (!autoScrollComplete) {
106			   $('html, body').animate({
107			        scrollTop: $( '.hero-row' ).offset().top
108			    }, 1000);
109			   autoScrollComplete = true;
110			}
111		});
112
113
114		// $(".scroll-top").click(function( event) {
115		// 	event.preventDefault();
116		//    $('html, body').animate({
117		//         scrollTop: $( $(this).attr('href')).offset().top
118		//     }, 1000);
119		// });
120	    
121
122
123		// filters
124		$(".filter-trigger").click(function (event) {
125			event.preventDefault();
126			$('.filter-container').toggleClass('open');
127		});
128
129		$('.expand-trigger').click(function (event) {
130			event.preventDefault();
131			var expand_target = $(this).attr("data-expandtarget");
132			var scroll_to_div = $(this).parent('.expanding-content-container');
133			// alert("opening #"+expand_target);
134			$('#'+expand_target).toggleClass('open');
135			$('#'+expand_target).slideToggle(200,'swing');//, function(){
136				// on slidetoggle complete
137
138			//});
139				if (!$('#'+expand_target).hasClass('open')) {
140					$('html, body').animate({
141						scrollTop: (scroll_to_div.offset().top - 100)
142					}, 200);
143				}
144			
145
146		});
147
148		// toggles
149		// $(".show_hide_content").hide();
150		// $(".trigger-btn").click(function( event) {
151		// 	event.preventDefault();
152		// 	var contentIsVisible = $(this).prev(".show_hide_content").is(":visible");
153		// 	var trigger = $(this);
154		// 	// already visible so we're hiding now. change to open trigger content
155		// 	if (contentIsVisible) { 
156		// 		$(this).html($(this).attr('data-opentrigger'));
157	 //        	$(this).prev(".show_hide_content").slideToggle();
158		// 	    $('html, body').animate({
159		// 	      	scrollTop: trigger.parent().offset().top
160		// 	    }, "fast");			        	
161		// 	}
162		// 	// hidden. so it's going to slide open and we'll show "close" button
163		// 	else {
164		// 		$(this).html($(this).attr('data-closetrigger'));
165		// 		$(this).prev(".show_hide_content").slideToggle("fast");
166		// 	}						
167		// });
168	});
169
170
171
172} )( 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.