1/*------------------------------------------------------------------------ 2# JoomShaper Accordion Module by JoomShaper.com 3# ------------------------------------------------------------------------ 4# author JoomShaper http://www.joomshaper.com 5# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved. 6# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL 7# Websites: http://www.joomshaper.com 8-------------------------------------------------------------------------*/ 9 10!(function($){ 11 12 $.fn.spAccordion = function(options){ 13 14 var settings = $.extend({ 15 hidefirst: 0 16 }, options); 17 18 return this.each(function(){ 19 20 var $items = $(this).find('>div'); 21 var $handlers = $items.find('.toggler'); 22 var $panels = $items.find('.sp-accordion-container'); 23 24 if( settings.hidefirst === 1 ) 25 { 26 $panels.hide().first(); 27 } 28 else 29 { 30 $handlers.first().addClass('active'); 31 $panels.hide().first().slideDown(); 32 } 33 34 $handlers.on('click', function(){ 35 36 if( $(this).hasClass('active') ) 37 { 38 $(this).removeClass('active'); 39 $panels.slideUp(); 40 } 41 else 42 { 43 $handlers.removeClass('active'); 44 $panels.slideUp(); 45 $(this).addClass('active').parent().find('.sp-accordion-container').slideDown(); 46 } 47 48 event.preventDefault(); 49 }); 50 51 }); 52 }; 53 54})(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.