Currently I have images that, on mouseover, shows an img over another, but it fades in. I simply want it to show with no fade.
script:
<script type="text/javascript">
$(document).ready(function(){
$('.fade').hover(function() {
开发者_StackOverflow $(this).stop().animate({"opacity": 1});
},function() {
$(this).stop().animate({"opacity": 0});
})
});
</script>
you could try $(this).find('.caption').show()
instead of $('.caption', this).show();
Set animation duration to 0 like this:
$(this).stop().animate({ "opacity" : 1 }, 0);
精彩评论