Sha256: 146d3d0fcc05612f1a47b6836730eec2cd3f5347cb003e569f55de72709e8868

Contents?: true

Size: 803 Bytes

Versions: 4

Compression:

Stored size: 803 Bytes

Contents

(function ($) {
  $(document).ready(function() {

    $('.card > .card-reveal').each(function() {
      $(this).parent().css('overflow', 'hidden');
    });

    $(document).on('click.card', '.card', function (e) {
      if ($(this).find('.card-reveal').length) {
        if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
          $(this).find('.card-reveal').velocity({translateY: 0}, {duration: 225, queue: false, easing: 'easeInOutQuad'});
        }
        else if ($(e.target).is($('.card .activator')) ||
                 $(e.target).is($('.card .activator i')) ) {
          $(this).find('.card-reveal').velocity({translateY: '-100%'}, {duration: 300, queue: false, easing: 'easeInOutQuad'});
        }
      }


    });

  });
}( jQuery ));

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
materialize-sass-0.95.3.2 app/assets/javascripts/materialize/cards.js
materialize-sass-0.95.3.1 app/assets/javascripts/materialize/cards.js
materialize-sass-0.95.3 app/assets/javascripts/materialize/cards.js
materialize-sass-0.95.2 app/assets/javascripts/materialize/cards.js