/** * jQuery Mobile Menu * Turn unordered list menu into dropdown select menu * version 1.1(27-JULY-2013) * * Built on top of the jQuery library * http://jquery.com * * Documentation * http://github.com/mambows/mobilemenu */ (function ($) { $.fn.mobileMenu = function (options) { var defaults = { defaultText: 'Home', containerName: 'select-menu', className: 'select', subMenuClass: 'sub-menu', subMenuDash: '–' }, settings = $.extend(defaults, options), el = $(this); this.each(function () { var $el = $(this), $select_menu; // ad class to submenu list $el.find('ul').addClass(settings.subMenuClass); // Create base menus var $select_container = $('
', { 'class': settings.containerName }).insertAfter($el), $select_menu = $('