PageSourceSearch

https://wifo-fs.de/files/cto_layout/scripts/pushy/js/pushy.js

js wifo-fs.de collected 2026-10-08 05:43:13 UTC 2,442 bytes, 80 lines download raw bytes

1/*! Pushy - v0.9.1 - 2013-9-16
2* Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions.
3* https://github.com/christophery/pushy/
4* by Christopher Yee */
5
6jQuery(function() {
7	var pushy = jQuery('.pushy'), //menu css class
8		body = jQuery('body'),
9		container = jQuery('#wrapper'), //container css class
10		push = jQuery('.push'), //css class to add pushy capability
11		siteOverlay = jQuery('.site-overlay'), //site overlay
12		pushyClass = "pushy-left pushy-open", //menu position & menu open class
13		pushyActiveClass = "pushy-active", //css class to toggle site overlay
14		containerClass = "container-push", //container open class
15		pushClass = "push-push", //css class to add pushy capability
16		menuBtn = jQuery('.menu-btn, .pushy a'), //css classes to toggle the menu
17		menuSpeed = 200, //jQuery fallback menu speed
18		menuWidth = pushy.width() + "px"; //jQuery fallback menu width
19
20	function togglePushy(){
21		body.toggleClass(pushyActiveClass); //toggle site overlay
22		pushy.toggleClass(pushyClass);
23		container.toggleClass(containerClass);
24		push.toggleClass(pushClass); //css class to add pushy capability
25	}
26
27	function openPushyFallback(){
28		body.addClass(pushyActiveClass);
29		pushy.animate({left: "0px"}, menuSpeed);
30		container.animate({left: menuWidth}, menuSpeed);
31		push.animate({left: menuWidth}, menuSpeed); //css class to add pushy capability
32	}
33
34	function closePushyFallback(){
35		body.removeClass(pushyActiveClass);
36		pushy.animate({left: "-" + menuWidth}, menuSpeed);
37		container.animate({left: "0px"}, menuSpeed);
38		push.animate({left: "0px"}, menuSpeed); //css class to add pushy capability
39	}
40
41	if(Modernizr.csstransforms3d){
42		//toggle menu
43		menuBtn.click(function() {
44			togglePushy();
45		});
46		//close menu when clicking site overlay
47		siteOverlay.click(function(){ 
48			togglePushy();
49		});
50	}else{
51		//jQuery fallback
52		pushy.css({left: "-" + menuWidth}); //hide menu by default
53		container.css({"overflow-x": "hidden"}); //fixes IE scrollbar issue
54
55		//keep track of menu state (open/close)
56		var state = true;
57
58		//toggle menu
59		menuBtn.click(function() {
60			if (state) {
61				openPushyFallback();
62				state = false;
63			} else {
64				closePushyFallback();
65				state = true;
66			}
67		});
68
69		//close menu when clicking site overlay
70		siteOverlay.click(function(){ 
71			if (state) {
72				openPushyFallback();
73				state = false;
74			} else {
75				closePushyFallback();
76				state = true;
77			}
78		});
79	}
80});

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.