Sha256: b2b36620597502d26f35de79a75b6f4d6ccd236ebf975ce61e315581b80fd555

Contents?: true

Size: 1 KB

Versions: 10

Compression:

Stored size: 1 KB

Contents

;(function ($, window, undefined){
  'use strict';

  $.fn.foundationAccordion = function (options) {
    var $accordion = $('.accordion');

    if ($accordion.hasClass('hover') && !Modernizr.touch) {
      $('.accordion li', this).on({
        mouseenter : function () {
          console.log('due');
          var p = $(this).parent(),
            flyout = $(this).children('.content').first();

          $('.content', p).not(flyout).hide().parent('li').removeClass('active'); //changed this
          flyout.show(0, function () {
            flyout.parent('li').addClass('active');
          });
        }
      });
    } else {
      $('.accordion li', this).on('click.fndtn', function () {
        var p = $(this).parent(),
            flyout = $(this).children('.content').first();

        $('.content', p).not(flyout).hide().parent('li').removeClass('active'); //changed this
        flyout.show(0, function () {
          flyout.parent('li').addClass('active');
        });
      });
    }

  };

})( jQuery, this );

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
aladdin-0.0.7 assets/__js/foundation/jquery.foundation.accordion.js
aladdin-0.0.6 assets/__js/foundation/jquery.foundation.accordion.js
aladdin-0.0.5 assets/javascripts/foundation/jquery.foundation.accordion.js
aladdin-0.0.4 assets/javascripts/foundation/jquery.foundation.accordion.js
aladdin-0.0.3 assets/javascripts/foundation/jquery.foundation.accordion.js
aladdin-0.0.1 assets/javascripts/foundation/jquery.foundation.accordion.js
zurb-foundation-3.2.0 vendor/assets/javascripts/foundation/jquery.foundation.accordion.js
zurb-foundation-3.2.0.rc3 vendor/assets/javascripts/foundation/jquery.foundation.accordion.js
zurb-foundation-3.2.0.rc2 vendor/assets/javascripts/foundation/jquery.foundation.accordion.js
zurb-foundation-3.2.0.rc1 vendor/assets/javascripts/foundation/jquery.foundation.accordion.js