/* Responsive Mobile Menu v1.0 Plugin URI: responsivemobilemenu.com Author: Sergio Vitov Author URI: http://xmacros.com License: CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ */ function responsiveMobileMenu() { $('.rmm').each(function() { $(this).children('ul').addClass('rmm-main-list'); // mark main menu list var $style = $(this).attr('data-menu-style'); // get menu style if ( typeof $style == 'undefined' || $style == false ) { $(this).addClass('graphite'); // set graphite style if style is not defined } else { $(this).addClass($style); } /* width of menu list (non-toggled) */ var $width = 0; $(this).find('ul li').each(function() { $width += $(this).outerWidth(); }); // if modern browser if ($.support.leadingWhitespace) { $(this).css('max-width' , $width*1.05+'px'); } // else { $(this).css('width' , $width*1.05+'px'); } }); } function getMobileMenu() { /* build toggled dropdown menu list */ $('.rmm').each(function() { var menutitle = $(this).attr("data-menu-title"); if ( menutitle == "" ) { menutitle = "Menu"; } else if ( menutitle == undefined ) { menutitle = "Menu"; } var $menulist = $(this).children('.rmm-main-list').html(); var $menucontrols ="