jQuery-当鼠标悬停在图像上时,动态向上滑动Div

jQuery-当鼠标悬停在图像上时,动态向上滑动Div,jquery,image,Jquery,Image,当鼠标悬停在图像上时,我需要在图像上动态显示一个div。我需要为很多图像做这个,所以它需要是动态的。我从以下位置查看代码: 有一种方法可以通过使用div而不是header来修改它?? 也许有更好的方法做这件事 谢谢 当然。给你的div一个class“slider”: IE7中的这段代码有一个问题。也可能在IE6中。 jQuery.fn.masque = function(classe) { $(this).hover(function(){ $(this).find(classe).stop(

当鼠标悬停在图像上时,我需要在图像上动态显示一个div。我需要为很多图像做这个,所以它需要是动态的。我从以下位置查看代码:

有一种方法可以通过使用div而不是header来修改它?? 也许有更好的方法做这件事


谢谢

当然。给你的div一个class
“slider”


IE7中的这段代码有一个问题。也可能在IE6中。
jQuery.fn.masque = function(classe) {

$(this).hover(function(){
$(this).find(classe).stop().animate({height:'40px',opacity: '0.9'},400);
},function () { 
$(this).find(classe).stop().animate({height:'0',opacity: '0'}, 400);
});
}   
$(document).ready(function(){$('.thumb h2').masque('.masque');}); 
$(document).ready(function(){$('div.slider').masque('.masque');});