PageSourceSearch

https://www.new-techeurope.com/wp-content/themes/wiksi/js/custom.js?ver=1.0.0

js new-techeurope.com collected 2026-10-02 10:25:33 UTC 5,601 bytes, 226 lines download raw bytes

1/******************************************************************************
2* Custom Script --------------------------------------------------------------*
3******************************************************************************/
4
5jQuery(document).ready(function() {
6
7/*****carousel slider*****/
8// settings
9var $slider = $('.slider'); // class or id of carousel slider
10var $slide = 'li'; // could also use 'img' if you're not using a ul
11var $transition_time = 1000; // 1 second
12var $time_between_slides = 3000; // 3 seconds
13
14	function slides(){
15  		return $slider.find($slide);
16	}
17
18slides().fadeOut();
19
20// set active classes
21slides().first().addClass('active');
22slides().first().fadeIn($transition_time);
23
24// auto scroll 
25$interval = setInterval(
26    function(){
27      var $i = $slider.find($slide + '.active').index();
28    
29      slides().eq($i).removeClass('active');
30      slides().eq($i).fadeOut($transition_time);
31    
32      if (slides().length == $i + 1) $i = -1; // loop to start
33    
34      slides().eq($i + 1).fadeIn($transition_time);
35      slides().eq($i + 1).addClass('active');
36    }
37    , $transition_time +  $time_between_slides 
38);
39
40
41/*****Tabs*****/
42//When page loads...
43$('.tabs-wrapper').each(function() {
44	$(this).find(".tab_content").hide(); //Hide all content
45	$(this).find("ul.tabs li:first").addClass("active").show(); //Activate first tab
46	$(this).find(".tab_content:first").show(); //Show first tab content
47});
48	
49//On Click Event
50$("ul.tabs li").click(function(e) {
51	$(this).parents('.tabs-wrapper').find("ul.tabs li").removeClass("active"); //Remove any "active" class
52	$(this).addClass("active"); //Add "active" class to selected tab
53	$(this).parents('.tabs-wrapper').find(".tab_content").hide(); //Hide all tab content
54
55	var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
56	$(this).parents('.tabs-wrapper').find(activeTab).fadeIn(); //Fade in the active ID content
57		
58	e.preventDefault();
59});
60
61
62/*****Toggle*****/
63$(".toggle-content").hide(); 
64
65$("h5.toggle").toggle(function(){
66	$(this).addClass("active");
67	}, function () {
68	$(this).removeClass("active");
69});
70
71$("h5.toggle").click(function(){
72	$(this).next(".toggle-content").slideToggle();
73});
74   
75
76/*****simplyScroll*****/	
77$(function() {
78	$("#scroller").simplyScroll();
79});
80
81
82/*****Mobile*****/
83
84$(window).resize(function(){
85	if ($(window).width() <= 768){	
86		jQuery('#nav-menu .nav-menu').mobileMenu({
87				defaultText: 'Navigate to...',					//default text for select menu
88				className: 'select-menu',						//class name
89				subMenuDash: '&nbsp;&nbsp;&nbsp;&ndash;'		//submenu separator
90		});
91	}	
92});
93
94/*****FlexSlider*****/
95$('.flexslider').flexslider({
96	animation: "slide",  // slide or fade
97	slideshowSpeed: 4000, // Time in milliseconds before the the next slide starts 
98	
99});
100
101/*****Home-Reviews*****/
102$('.reviews').flexslider({
103	animation: "slide",  // slide or fade
104	slideshow: false,   // true or false
105	directionNav: false,  
106	controlsContainer: ".control-nav",
107	controlNav: true, 
108	smoothHeight: true,
109	animationSpeed: 800 
110});
111
112/*****Superfish*****/
113$('#nav-menu ul').superfish({
114	delay: 200,
115	animation: { height:'show'},
116	speed: 'fast',
117	autoArrows: false,
118	dropShadows: false
119});
120
121/*****FitVids*****/
122$("#container").fitVids();
123
124/*****FancyBox*****/
125$(".img_frame").fancybox();
126
127$("#content .attachment a").fancybox({
128		openEffect	: 'none',
129		closeEffect	: 'none'
130});
131
132/*****Scroller*****/
133$("#back-to-top").hide();
134	$(function () {
135		$(window).scroll(function () {
136		if ($(this).scrollTop() > 400) {
137			$('#back-to-top').fadeIn();
138		} else {
139			$('#back-to-top').fadeOut();
140		}
141	});
142
143	$('#back-to-top').click(function () {
144		$('body,html').animate({
145			scrollTop: 0
146		}, 1000);
147		return false;
148	});
149});
150
151/*
152 * Smells Like Mobile Menu
153 * by Code n' Roll
154*/
155
156//  Get window width
157var windowWidth 	= $(window).width();
158
159// Create the toggle button object
160function smellsMenu_button(title, bars = 4) {
161	
162	if( !title ) {
163		title = "Toggle Navigation Menu";
164	}
165	
166	var  output = '<button type="button" id="mob-menu-btn">';
167	
168	for (i = 0; i < bars; i++) { 
169	    output += '<span class="bar"></span>';
170	}
171	
172	output += '<span class="sr-only">Toggle Navigation Menu</span>';
173	output += '</button>';
174	
175	return output;
176		
177}
178
179// Check if the width is match for smatrphones
180if( windowWidth < 769 ) {
181	
182	// Append the toggle button to the logo
183	$("#header .logo").append( smellsMenu_button() );
184	
185	// Prepend the wrapper of the menu to our body
186	$("body").prepend( '<div id="mob-menu"></div>' );
187	
188	// Fill our menu with the links from the real menu
189	$("#primary-navigation ul").clone().removeClass().prependTo("#mob-menu");
190	
191	// Remove the real menu completely
192	$("#primary-navigation").remove();
193	
194	// Remove classes from the list items of the new menu
195	$("#mob-menu ul li").removeClass();
196	
197	// Create the width of the menu
198	$("#mob-menu").width( windowWidth - (windowWidth/6) );
199	
200	// Create the close button
201	$("#mob-menu").prepend('<button type="button" id="smells-close"><span aria-hidden="true">X</span><span class="sr-only">Close the menu</span></button>');
202	
203	$("#mob-menu-btn").click(function(){
204		
205		var the_menu = $("#mob-menu");
206		
207		if( !the_menu.hasClass("open") ) {
208			$("#mob-menu").css({'left': '0px'}).addClass("open");
209		}
210		else {
211			$("#mob-menu").css({'left': '-100%'}).removeClass("open");
212		}
213		
214	});
215	
216	$("#smells-close").click(function(){
217		$("#mob-menu").css({'left': '-100%'}).removeClass("open");
218	});
219	window.onscroll = function (e) { 
220		$("#mob-menu").css({'left': '-100%'}).removeClass("open");
221	} 
222}
223
224
225
226});

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.