1/* 2 * jQuery desktopDropNav plugin - prepare desktop nav for usage with Accordion plugin 3 */ 4;(function($) { 5 $.fn.desktopDropNav = function(o){ 6 // default options 7 var options = $.extend({ 8 openCloseClass: 'open-close', 9 openerClass: 'opener', 10 slideClass: 'slide' 11 },o); 12 13 return this.each(function(){ 14 if(!!$(this).find('ul').length) { 15 $(this).find('ul').each(function() { 16 var elemParent = $(this).closest('li'); 17 18 elemParent.addClass(options.openCloseClass).children('div').addClass(options.slideClass); 19 createBlock('<span>', options.openerClass, elemParent.children('a')); 20 }); 21 } 22 }); 23 24 function createBlock(element, className, place) { 25 $(element).addClass(className).appendTo(place); 26 } 27 }; 28})(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.