PageSourceSearch

https://atrealty.com.au/wp-content/themes/hicaliber-theme-hep/vend…/js/fullscreen-menu.js?ver=1.1.7.2

js atrealty.com.au collected 2026-10-01 15:41:46 UTC 3,209 bytes, 125 lines download raw bytes

1/*!
2 * classie - class helper functions
3 * from bonzo https://github.com/ded/bonzo
4 * 
5 * classie.has( elem, 'my-class' ) -> true/false
6 * classie.add( elem, 'my-new-class' )
7 * classie.remove( elem, 'my-unwanted-class' )
8 * classie.toggle( elem, 'my-class' )
9 */
10
11/*jshint browser: true, strict: true, undef: true */
12/*global define: false */
13
14( function( window ) {
15
16'use strict';
17
18// class helper functions from bonzo https://github.com/ded/bonzo
19
20function classReg( className ) {
21  return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
22}
23
24// classList support for class management
25// altho to be fair, the api sucks because it won't accept multiple classes at once
26var hasClass, addClass, removeClass;
27
28if ( 'classList' in document.documentElement ) {
29  hasClass = function( elem, c ) {
30    return elem.classList.contains( c );
31  };
32  addClass = function( elem, c ) {
33    elem.classList.add( c );
34  };
35  removeClass = function( elem, c ) {
36    elem.classList.remove( c );
37  };
38}
39else {
40  hasClass = function( elem, c ) {
41    return classReg( c ).test( elem.className );
42  };
43  addClass = function( elem, c ) {
44    if ( !hasClass( elem, c ) ) {
45      elem.className = elem.className + ' ' + c;
46    }
47  };
48  removeClass = function( elem, c ) {
49    elem.className = elem.className.replace( classReg( c ), ' ' );
50  };
51}
52
53function toggleClass( elem, c ) {
54  var fn = hasClass( elem, c ) ? removeClass : addClass;
55  fn( elem, c );
56}
57
58var classie = {
59  // full names
60  hasClass: hasClass,
61  addClass: addClass,
62  removeClass: removeClass,
63  toggleClass: toggleClass,
64  // short names
65  has: hasClass,
66  add: addClass,
67  remove: removeClass,
68  toggle: toggleClass
69};
70
71// transport
72if ( typeof define === 'function' && define.amd ) {
73  // AMD
74  define( classie );
75} else {
76  // browser global
77  window.classie = classie;
78}
79
80})( window );
81
82
83jQuery('document').ready(function(){
84
85	
86		var triggerBttn = document.getElementById( 'fullscreenMenu' ),
87			overlay = document.querySelector( 'div.overlay' ),
88			closeBttn = overlay.querySelector( 'button.overlay-close' );
89			transEndEventNames = {
90				'WebkitTransition': 'webkitTransitionEnd',
91				'MozTransition': 'transitionend',
92				'OTransition': 'oTransitionEnd',
93				'msTransition': 'MSTransitionEnd',
94				'transition': 'transitionend'
95			},
96			transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
97			support = { transitions : Modernizr.csstransitions };
98
99		function toggleOverlay() {			
100			if( classie.has( overlay, 'open' ) ) {
101				classie.remove( overlay, 'open' );
102				classie.add( overlay, 'close' );
103				var onEndTransitionFn = function( ev ) {
104					if( support.transitions ) {
105						if( ev.propertyName !== 'visibility' ) return;
106						this.removeEventListener( transEndEventName, onEndTransitionFn );
107					}
108					classie.remove( overlay, 'close' );
109				};
110				if( support.transitions ) {
111					overlay.addEventListener( transEndEventName, onEndTransitionFn );
112				}
113				else {
114					onEndTransitionFn();
115				}
116			}
117			else if( !classie.has( overlay, 'close' ) ) {
118				classie.add( overlay, 'open' );
119			}
120		}
121
122
123		//triggerBttn.addEventListener( 'click', toggleOverlay );
124		//closeBttn.addEventListener( 'click', toggleOverlay );	
125});

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.