1(function($) { 2$.fn.responsiveMenu = function(options) { 3var defaults = { 4autoArrows: false 5} 6 7var options = $.extend(defaults, options); 8return this.each(function() { 9var $this = $(this); 10var $window = $(window); 11var setClass = function() { 12if ($window.width() > 768) { 13$this.addClass('dropdown').removeClass('accordion').find('li:has(ul)').removeClass('accorChild'); 14} else { 15$this.addClass('accordion').find('li:has(ul)').addClass('accorChild').parent().removeClass('dropdown'); 16} 17} 18 19$window.resize(function() { 20setClass(); 21$this.find('ul').css('display', 'none'); 22}); 23 24setClass(); 25$this 26.addClass('responsive-menu') 27.find('a') 28.live('click', function(e) { 29var $a = $(this); 30var container = $a.next('ul,div'); 31if ($this.hasClass('accordion') && container.length > 0) { 32container.slideToggle(); 33return false; 34} 35}) 36.stop() 37.siblings('ul').parent('li').addClass('hasChild'); 38 39if (options.autoArrows) { 40$('.hasChild > a', $this) 41.find('strong').append('<span class="arrow"> </span>'); 42} 43}); 44} 45})(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.