PageSourceSearch

https://www.essomazout.be/scripts/main.js

js essomazout.be collected 2026-10-09 00:04:05 UTC 1,817 bytes, 71 lines download raw bytes

1//jQuery.noConflict();
2
3jQuery(document).ready(function($) {
4
5	var $nav_bar = $('#nav-bar .container'),
6		$search_bar = $('#search-bar'),
7		$search_toggle = $('.search-toggle'),
8		$site_search = $('#site-search'),
9		$menu_holder = $('#menu-primary-holder'),
10		$submenu_parents = $('.parent > a', $menu_holder),
11		$submenus = $('.sub-menu', $menu_holder),
12		open_state = 'is-open';
13
14	// FastClick config
15	FastClick.attach(document.body);
16	
17	// Show/hide form
18	$('.form-toggle').on('click', function(event) {
19		event.preventDefault();
20		
21		$(this).toggleClass(open_state).prev('form').stop(true, true).slideToggle(0);
22	});
23
24	// Close message
25	$('.message .close').on('click', function(event) {
26		event.preventDefault();
27
28		$(this).parents('.message').slideUp(0, function() {
29			$(this).remove();
30		});
31	});
32
33	// Show/hide search bar
34	$search_toggle.on('click', function(event) {
35		event.preventDefault();
36
37		// Reset primary nav
38		$submenu_parents.parent().removeClass(open_state);
39		$submenus.hide();
40		$('body').removeClass('nav-overlay');
41
42		// Toggle menu
43		$search_toggle.toggleClass(open_state);
44		$search_bar.stop(true, true).slideToggle(0);
45	});
46
47	// Remove search form on primary nav click
48	$submenu_parents.on('click', function() {
49		$search_toggle.removeClass(open_state);
50		$search_bar.hide();
51	});
52
53	// Reposition search bar in DOM for absolute positioning on desktop
54	function positionSearchBar() {
55		if ($(window).width() > 1200) $search_bar.appendTo($site_search);
56		else $search_bar.appendTo($nav_bar);
57	}
58	positionSearchBar();
59
60	// Prevents resize event firing constantly on resize
61	var resize;
62	$(window).resize(function() {
63		clearTimeout(resize);
64		resize = setTimeout(function() {
65
66			positionSearchBar();
67
68		}, 250);
69	});
70
71});

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.