PageSourceSearch

https://vertical-t.ru/wp-content/themes/colornews/js/custom.js?ver=20150708

js vertical-t.ru collected 2026-10-02 22:27:44 UTC 4,358 bytes, 155 lines download raw bytes

1jQuery( document ).ready( function () {
2	jQuery( '.search-icon' ).click( function () {
3		jQuery( '.search-box' ).toggleClass( 'active' );
4	} );
5
6	jQuery( '.close' ).click( function () {
7		jQuery( '.search-box' ).removeClass( 'active' );
8	} );
9
10	/******** bx-slider ***********/
11	if ( typeof jQuery.fn.bxSlider !== 'undefined' ) {
12		jQuery( '.bxslider' ).bxSlider( {
13			pagerCustom : '.bx-pager',
14			controls    : false,
15			auto        : true
16		} );
17
18		jQuery( '.carousel-slider' ).bxSlider( {
19			minSlides   : 5,
20			maxSlides   : 8,
21			slideWidth  : 133,
22			slideMargin : 7,
23			pager       : false
24		} );
25
26		jQuery( '.blog .gallery-images, .archive .gallery-images, .search .gallery-images, .single-post .gallery-images' ).bxSlider( {
27			mode           : 'fade',
28			speed          : 1500,
29			auto           : true,
30			pause          : 3000,
31			adaptiveHeight : true,
32			nextText       : '',
33			prevText       : '',
34			pager          : false
35		} );
36	}
37
38	jQuery( '.category-toggle-block' ).click( function () {
39		jQuery( '.category-menu' ).slideToggle();
40	} );
41
42	jQuery( '#site-navigation .menu-toggle' ).click( function () {
43		jQuery( '#site-navigation .menu' ).slideToggle( 'slow' );
44	} );
45
46	jQuery( '#site-navigation .menu-item-has-children' ).append( '<span class="sub-toggle"> <i class="fa fa-angle-right"></i> </span>' );
47
48	jQuery( '#site-navigation .sub-toggle' ).click( function () {
49		jQuery( this ).parent( '.menu-item-has-children' ).children( 'ul.sub-menu' ).first().slideToggle( '1000' );
50		jQuery( this ).children( '.fa-angle-right' ).first().toggleClass( 'fa-angle-down' );
51	} );
52
53	// scroll up setting
54	jQuery( '#scroll-up' ).hide();
55	jQuery( function () {
56		jQuery( window ).scroll( function () {
57			if ( jQuery( this ).scrollTop() > 800 ) {
58				jQuery( '#scroll-up' ).fadeIn();
59			} else {
60				jQuery( '#scroll-up' ).fadeOut();
61			}
62		} );
63		jQuery( 'a#scroll-up' ).click( function () {
64			jQuery( 'body,html' ).animate( {
65				scrollTop : 0
66			}, 1400 );
67			return false;
68		} );
69	} );
70
71	/* FitVids Setting */
72	jQuery( '.fitvids-video' ).fitVids();
73
74	// Featured image pop up.
75	if ( typeof jQuery.fn.magnificPopup !== 'undefined' ) {
76		jQuery( '.image-popup' ).magnificPopup( { type : 'image' } );
77	}
78
79	// For sticky menu.
80	if ( typeof jQuery.fn.sticky !== 'undefined' ) {
81		var wpAdminBar = jQuery( '#wpadminbar' );
82		if ( wpAdminBar.length ) {
83			jQuery( '.bottom-header-wrapper' ).sticky( {
84				topSpacing : wpAdminBar.height(),
85				zIndex     : 999
86			} );
87		} else {
88			jQuery( '.bottom-header-wrapper' ).sticky( {
89				topSpacing : 0,
90				zIndex     : 999
91			} );
92		}
93	}
94
95	// For ticker setting.
96	if ( typeof jQuery.fn.tickerme !== 'undefined' ) {
97		jQuery( '#typing' ).tickerme( {
98			fade_speed : 1500,
99			duration   : 5000,
100		} );
101	}
102
103
104} );
105jQuery( document ).on( 'click', '#site-navigation .menu li.menu-item-has-children > a', function ( event ) {
106	var menuClass = jQuery( this ).parent( '.menu-item-has-children' );
107	if ( ! menuClass.hasClass( 'focus' ) ) {
108		menuClass.addClass( 'focus' );
109		event.preventDefault();
110		menuClass.children( '.sub-menu' ).css( {
111			'display' : 'block'
112		} );
113	}
114} );
115
116( function() {
117	var container, menu, links, i, len;
118
119	container = document.getElementById( 'site-navigation' );
120	if ( ! container ) {
121		return;
122	}
123
124	menu = container.getElementsByTagName( 'ul' )[0];
125
126	// Get all the link elements within the menu.
127	links = menu.getElementsByTagName( 'a' );
128
129	// Each time a menu link is focused or blurred, toggle focus.
130	for ( i = 0, len = links.length; i < len; i++ ) {
131		links[i].addEventListener( 'focus', toggleFocus, true );
132		links[i].addEventListener( 'blur', toggleFocus, true );
133	}
134
135	/**
136	 * Sets or removes .focus class on an element.
137	 */
138	function toggleFocus() {
139		var self = this;
140
141		// Move up through the ancestors of the current link until we hit .nav-menu.
142		while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
143			// On li elements toggle the class .focus.
144			if ( 'li' === self.tagName.toLowerCase() ) {
145				if ( -1 !== self.className.indexOf( 'focus' ) ) {
146					self.className = self.className.replace( ' focus', '' );
147				} else {
148					self.className += ' focus';
149				}
150			}
151
152			self = self.parentElement;
153		}
154	}
155} )();

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.