HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/index_lixo/wp-content/themes/CherryFramework/js/jquery.mobilemenu.js
/**
 * jQuery Mobile Menu
 * Turn unordered list menu into dropdown select menu
 * version 1.0(31-OCT-2011)
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Documentation
 *   http://github.com/mambows/mobilemenu
 */
(function($){
	$.fn.mobileMenu = function(options) {
		var defaults = {
				defaultText: 'Navigate to...',
				className: 'select-menu',
				subMenuClass: 'sub-menu',
				subMenuDash: '–'
				},
			settings = $.extend( defaults, options ),
			el = $(this);

		$("head").append('<style type="text/css">@media(max-width: 767px){.sf-menu{display:none;} .select-menu{display: block;}}</style>')

		this.each(function(){
			// ad class to submenu list
			el.find('ul').addClass(settings.subMenuClass);

			// Create base menu
			$('<select />',{'class':settings.className}).insertAfter(el);

			// Create default option
			$('<option />', {"value":'#', "text":settings.defaultText}).appendTo( '.' + settings.className );

			// Create select option from menu
			el.find('a,.separator').each(function(){
				var $this  = $(this),
					// optText = $this.context.firstChild.textContent,
					optText = $this.text(),
					optSub = $this.parents( '.' + settings.subMenuClass ),
					len   = optSub.length,
					dash;
				// if menu has sub menu
				if( $this.parents('ul').hasClass( settings.subMenuClass ) ) {
					dash = Array( len+1 ).join( settings.subMenuDash );
					optText = dash + optText;
				}
				if($this.is('span')){
					// Now build menu and append it
					$('<optgroup />', {"label":optText,}).appendTo('.' + settings.className);
				}else{
					// Now build menu and append it
					$('<option />', {"value":this.href, "html":optText, "selected":(this.href == window.location.href)}).appendTo( '.' + settings.className );
				}
			}); // End el.find('a').each

			// Change event on select element
			$('.' + settings.className).change(function(){
				var locations = $(this).val();
				if( locations !== '#' ) {
					window.location.href = $(this).val();
				}
			});
		}); // End this.each
		return this;
	};
})(jQuery);