我正在使用以下代碼進行懸停。但此代碼不適用於ajaxload。JavaScript上懸停不工作的Ajax負載?
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.products-grid .item').hover(function(){
jQuery(this).find('.pro-review').animate({bottom:'0'}, 200);
jQuery(this).find('.pro-view').show();
}, function(){
jQuery(this).find('.pro-review').stop(true,true).animate({bottom:'-37'}, 200);
jQuery(this).find('.pro-view').hide();
});
)};
</script>
我找到替代這個像下面
<script type="text/javascript">
jQuery(document).on("hover",".products-grid .item", function() {
jQuery(this).find('.pro-review').animate({bottom:'0'}, 200);
jQuery(this).find('.pro-view').show();
});
</script>
但我沒有找到如何解決第二功能。
, function(){
jQuery(this).find('.pro-review').stop(true,true).animate({bottom:'-37'}, 200);
jQuery(this).find('.pro-view').hide();
});
如何爲第二個功能是我使用的第一個功能
添加另一個監聽器'mouseleave',應該做的伎倆 – NoLifeKing