Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

flippy with .hover() / .mouseenter().. #27

Open
manu37 opened this issue Dec 18, 2013 · 1 comment
Open

flippy with .hover() / .mouseenter().. #27

manu37 opened this issue Dec 18, 2013 · 1 comment

Comments

@manu37
Copy link

manu37 commented Dec 18, 2013

Great plugin!
But is there a reason why there is a consecutive mouseenter/mouseover event triggered while mousover action? Why not only once?
retards
manu

@richardroyal
Copy link

We had a client that wanted this and I didn't see anything in the docs.

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

  var flipping = [];

  $flippy = $('.masonry .post');
  $flippy.hover( 

    function(){
      $box = $(this);
      if( $.inArray( $box.attr('id'), flipping ) == -1 ){
        flipping.push( $box.attr('id') );
        $content = $box.html();

        $box.flippy({
          color_target: $box.css('background-color'),
          direction: 'LEFT',
          depth: 0.05,
          light: 40,
          verso: $content,
          duration: "400",
          /*noCSS: true,*/
        });
      }
    },

    function(){
      $box = $(this);
      in_array_at_index = $.inArray( $box.attr('id'), flipping );
      if( in_array_at_index > -1 ){
        flipping.splice( in_array_at_index, 1 );
      }
    }

  );

});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants