If news_img
hover should be hide top to bottom else news_img
show bottom to top. I tried with this. jsfiddle
You can hide #news_img
by default:
#news_img{
display: none;
}
and use slideToggle() instead:
$(document).ready(function() {
$("#news").hover(function(){
$("#news_img").slideToggle();
});
});
Use jQuery .animate()
. Try this:
$(document).ready(function() {
$("#news").hover(function(){
$('#news_img').animate({
height: 'toggle'
}, 290, function() {
});
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.