2

我正在使用jQuery翻转,我想在悬停时停止翻转,并在鼠标悬停时反转它并停止它,如果我将鼠标放在它上面也保持停止......

 $(document).ready(function(){

  $('.sponsorFlip').hover(function(){

    var elem = $(this);

        elem.flip({
            direction:'bt',
            speed: 350,
            onBefore: function(){

                elem.html(elem.siblings('.sponsorData').html());
            }

        });

  }, function() {$(this).revertFlip();});

});
4

1 回答 1

0
$('.sponsorFlip').mouseover(function(){
    var elem = $(this);
    elem.flip({
      direction:'bt',
      speed: 350,
      onBefore: function(){
        elem.html(elem.siblings('.sponsorData').html());
      }
     });

  }).mouseout(function() {$(this).revertFlip();});
于 2012-08-21T18:26:21.283 回答