Sha256: 265be67610092ad77cb992fdb1a088bb898e693329a056b3d93fb3c39d52c428
Contents?: true
Size: 672 Bytes
Versions: 12
Compression:
Stored size: 672 Bytes
Contents
$(document).ready(function () { $('.accordion-tabs').each(function(index) { $(this).children('li').first().children('a').addClass('is-active').next().addClass('is-open').show(); }); $('.accordion-tabs').on('click', 'li > a', function(event) { if (!$(this).hasClass('is-active')) { event.preventDefault(); var accordionTabs = $(this).closest('.accordion-tabs'); accordionTabs.find('.is-open').removeClass('is-open').hide(); $(this).next().toggleClass('is-open').toggle(); accordionTabs.find('.is-active').removeClass('is-active'); $(this).addClass('is-active'); } else { event.preventDefault(); } }); });
Version data entries
12 entries across 12 versions & 3 rubygems