PageSourceSearch

https://joaquinlois.com/wp-content/themes/joaquinlois/js/joaquinlois.js

js joaquinlois.com collected 2026-10-02 13:22:45 UTC 5,699 bytes, 209 lines download raw bytes

1
2
3
4
5/*
6
7Responsive Mobile Menu v1.0
8Plugin URI: responsivemobilemenu.com
9
10Author: Sergio Vitov
11Author URI: http://xmacros.com
12
13License: CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
14
15*/
16
17
18
19
20function responsiveMobileMenu() {	
21		$('.rmm').each(function() {
22			$(this).children('ul').addClass('rmm-main-list');	// mark main menu list
23			var $style = $(this).attr('data-menu-style');	// get menu style
24				if ( typeof $style == 'undefined' ||  $style == false )
25					{$(this).addClass('graphite'); // set graphite style if style is not defined
26					}
27				else {	$(this).addClass($style);}
28			/* 	width of menu list (non-toggled) */
29			
30			var $width = 0;
31				$(this).find('ul li').each(function() {
32					$width += $(this).outerWidth();
33				});
34				
35			// if modern browser			
36			if ($.support.leadingWhitespace) {	$(this).css('max-width' , $width*1.05+'px');}	// 
37			else {	$(this).css('width' , $width*1.05+'px');}
38		
39	 	});
40}
41function getMobileMenu() {
42
43	/* 	build toggled dropdown menu list */
44	
45	$('.rmm').each(function() {	
46				var menutitle = $(this).attr("data-menu-title");
47				if ( menutitle == "" ) {
48					menutitle = "Menu";
49				}
50				else if ( menutitle == undefined ) {
51					menutitle = "Menu";
52				}
53				var $menulist = $(this).children('.rmm-main-list').html();
54				var $menucontrols ="<div class='rmm-toggled-controls'><div class='rmm-toggled-title'>" + menutitle + "</div><div class='rmm-button'><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></div></div>";
55				$(this).prepend("<div class='rmm-toggled rmm-closed menu_movil'>"+$menucontrols+"<ul>"+$menulist+"</ul></div>");
56
57		});
58}
59
60
61
62
63
64
65
66
67
68
69
70
71
72function adaptMenu() {
73	
74	/* 	toggle menu on resize */
75	
76	$('.rmm').each(function() {
77			var $width = $(this).css('max-width');
78			$width = $width.replace('px', ''); 
79			if ( $(this).parent().width() < $width*2.05 ) {
80				$(this).children('.rmm-main-list').hide(0);
81				$(this).children('.rmm-toggled').show(0);	}
82			else {
83				$(this).children('.rmm-main-list').show(0);
84				$(this).children('.rmm-toggled').hide(0);}
85		});
86		
87}
88
89$(function() {
90	 responsiveMobileMenu();
91	 getMobileMenu();
92	 adaptMenu();
93	 
94	 /* slide down mobile menu on click */
95	 
96	 $('.rmm-toggled, .rmm-toggled .rmm-button').click(function(){
97	 	if ( $(this).is(".rmm-closed")) {
98		 	 $(this).find('ul').stop().show(300);
99		 	 $(this).removeClass("rmm-closed");
100	 	}
101	 	else {
102		 	$(this).find('ul').stop().hide(300);
103		 	 $(this).addClass("rmm-closed");
104	 	}
105		
106	});	
107
108});
109
110
111/* 	hide mobile menu on resize */
112$(window).resize(function() {
113 	adaptMenu();
114});
115
116
117
118
119
120		
121		
122
123
124
125/***********************************************************************************************************************
126DOCUMENT: includes/javascript.js
127DEVELOPED BY: Ryan Stemkoski
128COMPANY: Zipline Interactive
129EMAIL: [email protected]
130PHONE: 509-321-2849
131DATE: 3/26/2009
132UPDATED: 3/25/2010
133DESCRIPTION: This is the JavaScript required to create the accordion style menu.  Requires jQuery library
134NOTE: Because of a bug in jQuery with IE8 we had to add an IE stylesheet hack to get the system to work in all browsers. I hate hacks but had no choice :(.
135************************************************************************************************************************/
136
137$(document).ready(function() {
138
139
140	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
141	$('.desplegableButton').click(function() {
142		//REMOVE THE ON CLASS FROM ALL BUTTONS
143		$('.desplegableButton').removeClass('desplegable_on');		  
144		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
145	 	$('.desplegableContent').slideUp('normal');   
146		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
147		if($(this).next().is(':hidden') == true) {			
148			//ADD THE ON CLASS TO THE BUTTON
149			$(this).addClass('desplegable_on');			  
150			//OPEN THE SLIDE
151			$(this).next().slideDown('normal');
152		 } 
153	 });
154	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
155	
156
157	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 
158	$('.desplegableButton').mouseover(function() {
159		$(this).addClass('desplegable_over');
160
161	//ON MOUSEOUT REMOVE THE OVER CLASS
162	}).mouseout(function() {
163		$(this).removeClass('over');										
164	});
165	
166	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
167
168
169
170	/********************************************************************************************************************
171	CLOSES ALL S ON PAGE LOAD
172	********************************************************************************************************************/	
173	$('.desplegableContent').hide();
174
175
176	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
177	$('.desplegableButtonII').click(function() {
178		//REMOVE THE ON CLASS FROM ALL BUTTONS
179		$('.desplegableButtonII').removeClass('desplegable_on');		  
180		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
181	 	$('.desplegableContent').slideUp('normal');  
182		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
183		if($(this).next().is(':hidden') == true) {
184			//ADD THE ON CLASS TO THE BUTTON
185			$(this).addClass('desplegable_on');			  
186			//OPEN THE SLIDE
187			$(this).next().slideDown('normal');
188		 } 
189	 });
190
191	  
192	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/	
193
194	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 
195	$('.desplegableButtonII').mouseover(function() {
196		$(this).addClass('desplegable_over');		
197	//ON MOUSEOUT REMOVE THE OVER CLASS
198	}).mouseout(function() {
199		$(this).removeClass('over');						
200	});
201
202	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/	
203	/********************************************************************************************************************
204	CLOSES ALL S ON PAGE LOAD
205	********************************************************************************************************************/	
206	$('.desplegableContent').hide();
207});
208
209

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.