PageSourceSearch

https://yourhorsefarm.com/wp-content/themes/tuulikki/framework/assets/js/main.js?ver=7.1

js yourhorsefarm.com collected 2026-10-03 00:41:25 UTC 8,026 bytes, 321 lines download raw bytes

1(function(jQuery){
2	"use strict";
3
4
5
6
7jQuery(".gallery-row").removeAttr("style");
8
9
10jQuery('.post-header .meta_item ul li:last-child a, .menu-item a, a.woocommerce-main-image, a.zoom').addClass('no-animation');
11
12
13
14  /* ==================================================
15	Scroll Progress
16================================================== */
17
18jQuery(document).ready(function() {
19  jQuery(window).on('load scroll resize', function() {
20
21    var docHeight = jQuery(document).height();
22    var windowPos = jQuery(window).scrollTop();
23    var windowHeight = jQuery(window).height();
24    var windowWidth = jQuery(window).width();
25    var completion = windowPos / (docHeight - windowHeight);
26
27    if (docHeight <= windowHeight) {
28      jQuery('#progress').width(windowWidth);
29    } else {
30      jQuery('#progress').width(completion * windowWidth);
31    }
32
33  });
34});
35
36
37  /* ==================================================
38	Mini Menu
39================================================== */
40
41
42        jQuery(window).scroll(function(){
43            if (jQuery(this).scrollTop() > 400) {
44                jQuery('#mini-header').fadeIn(500);
45            } else {
46                jQuery('#mini-header').fadeOut(500);
47            }
48        });
49
50
51
52/* ==================================================
53	Gallery Posts
54================================================== */
55
56
57	function ig_posts_slider() {
58		jQuery(".ig_posts_slider").css("display","block");
59		jQuery('.ig_posts_slider').each( function() {
60			console.log("ig_posts_slider");
61
62			var $small_carousel = jQuery(this);
63			$small_carousel.on('init', function(slick) {
64				jQuery(".ig_posts_slider").css("display","block");
65			}).not('.slick-initialized').slick({
66				slidesToShow: 1,
67				slidesToScroll: 1,
68				adaptiveHeight: true,
69				dots: false,
70				infinite: true,
71				autoplay: false,
72				speed: 300,
73			});
74		});
75	}
76
77	function post_slider() {
78		// Setup each carousel
79		jQuery(".post-slider").each( function() {
80			var $carousel = jQuery(this);
81			$carousel.on('init', function(slick) {
82				$carousel.css("display","block");
83			}).slick( {
84				dots: false,
85				infinite: true,
86				autoplay: false,
87				speed: 600,
88				slidesToShow: 3,
89				centerMode: true,
90				variableWidth: true,
91			});
92			$carousel.slick('setPosition');
93
94			// Fade in each gallery like a boss
95			jQuery(".slick").each( function() {
96				jQuery(this).fadeTo( 200, 1 );
97			});
98			// Add next/prev navigation to the carousel
99			jQuery('.slick-slider').on('click', '.slick-slide', function (e) {
100				e.stopPropagation();
101				var index = jQuery(this).data("slick-index");
102				if (jQuery('.slick-slider').slick('slickCurrentSlide') !== index) {
103					jQuery('.slick-slider').slick('slickGoTo', index);
104				}
105			});
106			// Add classes to allow next/prev cursor styling
107			$carousel.mousemove( function(e){
108				var mouseXPosition = e.pageX - this.offsetLeft;
109				if (mouseXPosition < jQuery( window ).width() / 2 ) {
110					$carousel.removeClass( "right-arrow" );
111					$carousel.addClass( "left-arrow" );
112				} else {
113					$carousel.removeClass( "left-arrow" );
114					$carousel.addClass( "right-arrow" );
115				}
116			});
117		});
118	}
119
120	// Run Slick carousel
121	jQuery(window).load( function() {
122		ig_posts_slider();
123		post_slider();
124	});
125
126	/*jQuery(document.body).on( "post-load", function () {
127	    setTimeout( function() {
128		    run__one_slide();
129	        run__big_slider();
130	        run__small_slide();
131	        ig_posts_slider();
132
133	    }, 500 );
134	});*/
135
136
137/* ==================================================
138	Animation Menu
139================================================== */
140
141
142	jQuery('.click_menu, .menu-button').on('click', function(){
143		jQuery('.click_menu').toggleClass('is-clicked');
144			jQuery('.menu-button').toggleClass('fixed_button_rsp');
145
146		if( jQuery('.container_menu').hasClass('is-visible') ) {
147			jQuery('.container_menu').removeClass('is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',function(){
148				jQuery('body').removeClass('overflow-open');
149				jQuery('html').addClass('overflow-open');
150			});
151		} else {
152			jQuery('.container_menu').addClass('is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',function(){
153				jQuery('html').addClass('overflow-open');
154				jQuery('body').addClass('overflow-open');
155
156
157			});
158		}
159	});
160
161
162	jQuery('.menu-button').on('click', function() {
163	  jQuery('.ig-icon-menu').toggleClass("fa-bars fa-times");
164	});
165
166
167
168
169/* ==================================================
170	No Animation Tiled galllery
171================================================== */
172
173
174 jQuery( ".tiled-gallery-item a" ).addClass( "no-animation" );
175
176
177/* ==================================================
178	Menu Mobile
179================================================== */
180
181
182      jQuery('.nav-mobile').navgoco({
183              caretHtml: '<i class="some-random-icon-class"></i>',
184              accordion: true,
185              openClass: 'open',
186              save: true,
187              cookie: {
188                  name: 'navgoco',
189                  expires: false,
190                  path: '/'
191              },
192              slide: {
193                  duration: 400,
194                  easing: 'swing'
195              }
196          });
197
198
199
200
201/* ==================================================
202   Blog masonry
203================================================== */
204
205jQuery(window).load(function(){
206
207var $boxes = jQuery('.isotopeItem_masonry');
208var $container_masonry = jQuery('.isotopeWrapper');
209var $resize = jQuery('.isotopeWrapper');
210
211$boxes.css('opacity', '1');
212
213
214  var $container_masonry = jQuery('.masonryContainer');
215    $boxes.fadeIn();
216    $container_masonry.isotope({
217        itemSelector: '.isotopeItem_masonry'
218                })
219
220
221  });
222
223
224
225
226/* ==================================================
227   Instagram masonry
228================================================== */
229
230
231
232 jQuery(window).on('resize', function(){
233      var win = jQuery(this);
234      if (win.width() < 500) {
235
236 jQuery( ".instagram-pics li" ).addClass( "isotopeItem_masonry" );
237    jQuery( "#instagram-footer ul" ).addClass( "isotopeWrapper masonryContainer" );
238
239
240      }
241    else
242    {
243    jQuery( ".instagram-pics li" ).removeClass( "isotopeItem_masonry" );
244    jQuery( "#instagram-footer ul" ).removeClass( "isotopeWrapper masonryContainer" );
245
246
247    }
248
249});
250
251
252
253
254/* ==================================================
255   WOW Animation
256================================================== */
257
258
259 var wow = new WOW(
260    {
261      boxClass:     'wow',      // default
262      animateClass: 'animated', // default
263      offset:       0,          // default
264      mobile:       false,       // default
265      live:         true        // default
266    }
267  )
268  wow.init();
269
270
271
272
273/* ==================================================
274	Scroll To Top
275================================================== */
276
277
278jQuery(document).ready(function($){
279	// browser window scroll (in pixels) after which the "back to top" link is shown
280	var offset = 300,
281		//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
282		offset_opacity = 1200,
283		//duration of the top scrolling animation (in ms)
284		scroll_top_duration = 700,
285		//grab the "back to top" link
286		$back_to_top = $('.cd-top');
287
288	//hide or show the "back to top" link
289	$(window).scroll(function(){
290		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
291		if( $(this).scrollTop() > offset_opacity ) {
292			$back_to_top.addClass('cd-fade-out');
293		}
294	});
295
296	//smooth scroll to top
297	$back_to_top.on('click', function(event){
298		event.preventDefault();
299		$('body,html').animate({
300			scrollTop: 0 ,
301		 	}, scroll_top_duration
302		);
303	});
304
305});
306
307
308
309/* ==================================================
310   FitVids
311================================================== */
312
313    jQuery("body").fitVids();
314
315
316
317
318/* ==================================================
319   end
320================================================== */
321})(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.