Blame view

bower_components/Materialize/js/cards.js 954 Bytes
74249687   Luigi Serra   Cross browser con...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  (function ($) {
    $(document).ready(function() {
  
      $(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'))) {
            // Make Reveal animate down and display none
            $(this).find('.card-reveal').velocity(
              {translateY: 0}, {
                duration: 225,
                queue: false,
                easing: 'easeInOutQuad',
                complete: function() { $(this).css({ display: 'none'}); }
              }
            );
          }
          else if ($(e.target).is($('.card .activator')) ||
                   $(e.target).is($('.card .activator i')) ) {
74249687   Luigi Serra   Cross browser con...
19
20
21
22
            $(this).find('.card-reveal').css({ display: 'block'}).velocity("stop", false).velocity({translateY: '-100%'}, {duration: 300, queue: false, easing: 'easeInOutQuad'});
          }
        }
  
74249687   Luigi Serra   Cross browser con...
23
24
25
26
27
  
      });
  
    });
  }( jQuery ));