PageSourceSearch

https://www.glotechrepairs.co.uk/assets/js/helpers/hs.hamburgers.js

js glotechrepairs.co.uk collected 2026-10-04 04:39:53 UTC 1,213 bytes, 69 lines download raw bytes

1/**
2 * Hamburgers plugin helper.
3 *
4 * @author Htmlstream
5 * @version 1.0
6 * @requires hamburgers.min.css
7 *
8 */
9;(function($){
10	'use strict';
11
12	$.HSCore.helpers.HSHamburgers = {
13
14		/**
15		 * Initialize 'hamburgers' plugin.
16		 * 
17		 * @param String selector
18		 *
19		 * @return undefined;
20		 */
21		init: function(selector) {
22
23			if( !selector || !$(selector).length ) return;
24
25		  var hamburgers = $(selector),
26		  		timeoutid;
27
28		  hamburgers.each(function(i, el){
29
30		  	var $this = $(this);
31
32		  	if($this.closest('button').length) {
33		  		$this.closest('button').get(0).addEventListener('click', function(e){
34
35		  			var $self = $(this),
36		  					$hamburger = $self.find(selector);
37
38		  			if(timeoutid) clearTimeout(timeoutid);
39		  			timeoutid = setTimeout(function(){
40
41		  				$hamburger.toggleClass('is-active');
42
43		  			}, 10);
44		  			e.preventDefault();
45		  		}, false);
46		  	}
47		  	else {
48		  		$this.get(0).addEventListener('click', function(e){
49
50		  			var $self = $(this);
51
52		  			if(timeoutid) clearTimeout(timeoutid);
53		  			timeoutid = setTimeout(function(){
54
55		  				$self.toggleClass('is-active');
56
57		  			}, 10);
58		  			e.preventDefault();
59		  		}, false);
60		  	}
61
62		  });
63
64		}
65		
66
67	};
68
69})(jQuery);

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.