1(function($) { 2 3 $.fn.menumaker = function(options) { 4 5 var cssmenu = $(this), settings = $.extend({ 6 title: " ", 7 format: "dropdown", 8 sticky: false 9 }, options); 10 11 return this.each(function() { 12 cssmenu.prepend('<div id="menu-button">' + settings.title + '</div>'); 13 $(this).find("#menu-button").on('click', function(){ 14 $(this).toggleClass('menu-opened'); 15 var mainmenu = $(this).next('ul'); 16 if (mainmenu.hasClass('open')) { 17 mainmenu.hide().removeClass('open'); 18 } 19 else { 20 mainmenu.show().addClass('open'); 21 if (settings.format === "dropdown") { 22 mainmenu.find('ul').show(); 23 } 24 } 25 }); 26 27 cssmenu.find('li ul').parent().addClass('has-sub'); 28 29 multiTg = function() { 30 cssmenu.find(".has-sub").prepend('<span class="submenu-button"></span>'); 31 cssmenu.find('.submenu-button').on('click', function() { 32 $(this).toggleClass('submenu-opened'); 33 if ($(this).siblings('ul').hasClass('open')) { 34 $(this).siblings('ul').removeClass('open').hide(); 35 } 36 else { 37 $(this).siblings('ul').addClass('open').show(); 38 } 39 }); 40 }; 41 42 if (settings.format === 'multitoggle') multiTg(); 43 else cssmenu.addClass('dropdown'); 44 45 if (settings.sticky === true) cssmenu.css('position', 'fixed'); 46 47 resizeFix = function() { 48 if ($( window ).width() > 1187) { 49 cssmenu.find('ul').show(); 50 } 51 52 if ($(window).width() <= 768) { 53 cssmenu.find('ul').hide().removeClass('open'); 54 } 55 }; 56 resizeFix(); 57 return $(window).on('resize', resizeFix); 58 59 }); 60 }; 61})(jQuery); 62 63(function($){ 64$(document).ready(function(){ 65 66$("#cssmenu").menumaker({ 67 title: " ", 68 format: "multitoggle" 69}); 70 71}); 72})(jQuery);
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.