PageSourceSearch

https://theredroar.com/wp-content/themes/doberman/js/scripts_ver-1.2.js

js theredroar.com collected 2026-10-02 12:05:42 UTC 4,703 bytes, 193 lines download raw bytes

1jQuery(function( $ ) {
2	'use strict';
3	
4	var $body = $( 'body' );
5
6	/* -----------------------------------------
7	Responsive Menus Init with mmenu
8	----------------------------------------- */
9	var $mainNav   = $( '.navigation' );
10	var $mobileNav = $( '#mobilemenu' );
11
12	$mainNav.clone().removeAttr( 'id' ).removeClass().appendTo( $mobileNav );
13	$mobileNav.find( 'li' ).removeAttr( 'id' );
14
15	$mobileNav.mmenu({
16		offCanvas: {
17			position: 'top',
18			zposition: 'front'
19		},
20		"autoHeight": true,
21		"navbars": [
22			{
23				"position": "top",
24				"content": [
25					"prev",
26					"title",
27					"close"
28				]
29			}
30		]
31	});
32
33	/* -----------------------------------------
34	Main Navigation Init
35	----------------------------------------- */
36	$mainNav.superfish({
37		delay: 300,
38		animation: { opacity: 'show', height: 'show' },
39		speed: 'fast',
40		dropShadows: false
41	});
42
43	/* -----------------------------------------
44	Header Search
45	----------------------------------------- */
46	var $searchBtn    = $( '.site-search-trigger' );
47	var $headerSearch = $( '.site-search-form' );
48	var expandedClass = 'search-expanded';
49
50	$searchBtn.on( 'click', function( e ) {
51		e.preventDefault();
52
53		$headerSearch.toggleClass( expandedClass );
54		$headerSearch.find( 'input' ).trigger( 'focus' );
55	} );
56
57	document.onkeydown = function( e ) {
58		e = e || window.e;
59		if ( e.keyCode === 27 && $headerSearch.hasClass( expandedClass ) ) {
60			$headerSearch.removeClass( expandedClass );
61		}
62	};
63
64	$body.on( 'click', function() {
65		if ( $headerSearch.hasClass( expandedClass ) ) {
66			$headerSearch.removeClass( expandedClass );
67		}
68	} ).find( '.site-search' ).on( 'click', function( e ) {
69		e.stopPropagation();
70	} );
71	
72	
73	/* -----------------------------------------
74	Responsive Videos with fitVids
75	----------------------------------------- */
76	$body.fitVids();
77
78	/* -----------------------------------------
79	Image Lightbox
80	----------------------------------------- */
81	$( ".ci-lightbox, a[data-lightbox^='gal']" ).magnificPopup({
82		type: 'image',
83		mainClass: 'mfp-with-zoom',
84		gallery: {
85			enabled: true
86		},
87		zoom: {
88			enabled: true
89		}
90	} );
91
92	/* -----------------------------------------
93	Trending Slider
94	----------------------------------------- */
95	var $headTicker = $( '.head-ticker-slider' );
96
97	if ( $headTicker.length ) {
98		$headTicker.flexslider({
99			controlNav: false,
100			directionNav: false,
101			animation: "slide",
102			direction: "vertical",
103			prevText: '',
104			nextText: ''
105		});
106	}
107
108	/* -----------------------------------------
109	 Load More Button
110	 ----------------------------------------- */
111	function requestPosts(url) {
112		return $.ajax({
113			method: 'get',
114			url: url,
115			dataType: 'html'
116		});
117	}
118
119	(function() {
120		var $loadMore = $('.load-more').find('a');
121		var $content = $('#entries');
122
123		$loadMore.on('click', function(e) {
124			e.preventDefault();
125			var $this = $(this);
126			var req = requestPosts($this.attr('href'));
127
128			$this.addClass('ci-loading');
129
130			req.done(function(data, status) {
131				var $target, $entries;
132				var $data = $(data);
133				var $entryContainer = $data.find('#entries');
134				var $entryRow = $entryContainer.find('.row');
135				var nextPageUrl = $data.find('.load-more a').attr('href');
136
137				if ( $entryRow.length ) {
138					$target = $content.find('.row');
139					$entries = $entryRow.find('[class^="col"]');
140				} else {
141					$target = $content;
142					$entries = $entryContainer.find('.entry');
143				}
144
145				$target.append($entries);
146				$this.removeClass('ci-loading');
147				if ( nextPageUrl ) {
148					$this.attr('href', nextPageUrl);
149				} else {
150					$this.fadeOut();
151				}
152			});
153
154			req.fail(function(jqXHR, status, error) {
155				$this.fadeOut();
156			});
157		});
158	})();
159
160	$( window ).on( 'load', function() {
161		/* -----------------------------------------
162		Equal Heights
163		----------------------------------------- */
164		$('.row-equal').find('.entry-item-content-wrap').matchHeight();
165		
166		/* -----------------------------------------
167		FlexSlider Init
168		----------------------------------------- */
169		var homeSlider = $( '.home-slider' );
170
171		if ( homeSlider.length ) {
172			var animation      = homeSlider.data( 'animation' ),
173				direction      = homeSlider.data( 'direction' ),
174				slideshow      = homeSlider.data( 'slideshow' ),
175				slideshowSpeed = homeSlider.data( 'slideshowspeed' ),
176				animationSpeed = homeSlider.data( 'animationspeed' );
177
178			homeSlider.flexslider({
179				animation     : animation,
180				direction     : direction,
181				slideshow     : slideshow,
182				slideshowSpeed: slideshowSpeed,
183				animationSpeed: animationSpeed,
184				namespace: 'ci-',
185				prevText: '',
186				nextText: '',
187				start: function( slider ) {
188					slider.removeClass( 'loading' );
189				}
190			});
191		}
192	});
193});

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.