Sha256: 85fd1aa2cf42ee2e8b693fda756b1432eec14161110a3c5e812bb009fad0f3b6

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 Bytes

Contents

(function($, App) {
  'use strict';

  $(function() {
    $('.scrivito-accordion-group').each(function(i, group) {
      var accordion_group = $(group);
      accordion_group.find('.scrivito-accordion-title').each(function(i, accordion_title) {
        var accordion_title = $(accordion_title);
        accordion_title.on('click', function() {
          accordion_group.find('.scrivito-accordion-title').removeClass('scrivito-accordion-active');
          accordion_group.find('.scrivito-accordion-content').stop(true,false).slideUp(350);


          accordion_title.addClass('scrivito-accordion-active');
          accordion_title.next().stop(true,false).slideDown(350);
        });
      });
    });
  });
})(jQuery, this);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scrivito_accordion_widget-1.0.16 app/assets/javascripts/scrivito_accordion_widget.js