PageSourceSearch

https://www.woohome.com/wp-content/themes/colormag/js/colormag-custom.js?ver=7.1.2

js woohome.com collected 2026-10-03 22:08:55 UTC 3,776 bytes, 132 lines download raw bytes

1jQuery( document ).ready( function () {
2
3	// For Search Icon Toggle effect added at the top.
4	jQuery( '.search-top' ).click( function () {
5		jQuery( '#masthead .search-form-top' ).toggle();
6	} );
7
8	jQuery( '#scroll-up' ).hide();
9
10	jQuery( function () {
11		jQuery( window ).scroll( function () {
12			if ( jQuery( this ).scrollTop() > 1000 ) {
13				jQuery( '#scroll-up' ).fadeIn();
14			} else {
15				jQuery( '#scroll-up' ).fadeOut();
16			}
17		} );
18
19		jQuery( 'a#scroll-up' ).click( function () {
20			jQuery( 'body,html' ).animate( {
21				scrollTop : 0
22			}, 800 );
23			return false;
24		} );
25	} );
26
27	jQuery( '.better-responsive-menu #site-navigation .menu-item-has-children' ).append( '<span class="sub-toggle"> <i class="fa fa-caret-down"></i> </span>' );
28
29	jQuery( '.better-responsive-menu #site-navigation .sub-toggle' ).click( function () {
30		jQuery( this ).parent( '.menu-item-has-children' ).children( 'ul.sub-menu' ).first().slideToggle( '1000' );
31		jQuery( this ).children( '.fa-caret-right' ).first().toggleClass( 'fa-caret-down' );
32		jQuery( this ).toggleClass( 'active' );
33	} );
34
35	jQuery( document ).on( 'click', '#site-navigation ul li.menu-item-has-children > a', function ( event ) {
36		var menuClass = jQuery( this ).parent( '.menu-item-has-children' );
37
38		if ( ! menuClass.hasClass( 'focus' ) && jQuery( window ).width() <= 768 ) {
39			menuClass.addClass( 'focus' );
40			event.preventDefault();
41			menuClass.children( '.sub-menu' ).css( {
42				'display' : 'block'
43			} );
44		}
45	} );
46
47	/**
48	 * Scrollbar on fixed responsive menu
49	 */
50	jQuery( window ).load( function () {
51		if ( window.matchMedia( "(max-width: 768px)" ).matches && jQuery( '#masthead .sticky-wrapper' ).length >= 1 ) {
52
53			var screenHeight        = jQuery( window ).height();
54			var availableMenuHeight = screenHeight - 43;
55			var menu                = jQuery( '#site-navigation' ).find( 'ul' ).first();
56
57			menu.css( 'max-height', availableMenuHeight )
58			menu.addClass( 'menu-scrollbar' );
59
60		}
61	} );
62
63	// Featured Image Popup Setting.
64	if ( typeof jQuery.fn.magnificPopup !== 'undefined' ) {
65		jQuery( '.image-popup' ).magnificPopup( { type : 'image' } );
66	}
67
68	// Fitvids setting.
69	if ( typeof jQuery.fn.fitVids !== 'undefined' ) {
70		jQuery( '.fitvids-video' ).fitVids();
71	}
72
73	// Settings of the ticker.
74	if ( typeof jQuery.fn.newsTicker !== 'undefined' ) {
75		jQuery( '.newsticker' ).newsTicker( {
76			row_height   : 20,
77			max_rows     : 1,
78			speed        : 1000,
79			direction    : 'down',
80			duration     : 4000,
81			autostart    : 1,
82			pauseOnHover : 1
83		} );
84	}
85
86	// Settings of the sticky menu.
87	if ( typeof jQuery.fn.sticky !== 'undefined' ) {
88		var wpAdminBar = jQuery( '#wpadminbar' );
89		if ( wpAdminBar.length ) {
90			jQuery( '#site-navigation' ).sticky( {
91				topSpacing : wpAdminBar.height(),
92				zIndex     : 999
93			} );
94		} else {
95			jQuery( '#site-navigation' ).sticky( {
96				topSpacing : 0,
97				zIndex     : 999
98			} );
99		}
100	}
101
102	// BxSlider JS Settings.
103	if ( typeof jQuery.fn.bxSlider !== 'undefined' ) {
104		jQuery( '.widget_slider_area_rotate' ).bxSlider( {
105			mode           : 'horizontal',
106			speed          : 1500,
107			auto           : true,
108			pause          : 5000,
109			adaptiveHeight : true,
110			nextText       : '',
111			prevText       : '',
112			nextSelector   : '.slide-next',
113			prevSelector   : '.slide-prev',
114			pager          : false,
115			tickerHover    : true
116		} );
117
118		jQuery( '.blog .gallery-images, .archive .gallery-images, .search .gallery-images, .single-post .gallery-images' ).bxSlider( {
119			mode           : 'fade',
120			speed          : 1500,
121			auto           : true,
122			pause          : 3000,
123			adaptiveHeight : true,
124			nextText       : '',
125			prevText       : '',
126			nextSelector   : '.slide-next',
127			prevSelector   : '.slide-prev',
128			pager          : false
129		} );
130	}
131
132} );

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.