我有相同的类pro3
一个多股利和带班showcatdiv
如何使用javascript在多个div上显示鼠标悬停的div?
的图像,是这..我想显示分度pro3
上的showcatdiv
下面悬停WordPress的页面上的任何图像上追加是我pro3
DIV
<div class="pro3catProducts" style=" background-color: #FFFFFF; border: 0px solid black;
height: 279px; left: '200'px; opacity: 0.55; padding-left: 10px;
position: relative; top: '100'px; width: 39px; display:none;">
<IMG class="catsmallImages" id="catsmallImages1" SRC="Images/fashion.png" BORDER="1" ALT="" style="height: 37px; padding: 3px; width: 28px;">
<IMG class="catsmallImages" id="catsmallImages2" SRC="Images/fashion.png" BORDER="1" ALT="">
</div>
我写了一个javascript为它
<script type="text/javascript">
if (undefined !== window.jQuery) {
// script dependent on jQuery
alert("test");
jQuery(".showcatdiv").hover(function(){
//alert("test324");
jQuery(".pro3catProducts").show();
});
}
</script>
有了这个它显示在每一个我的PRO3 DIV法师..我想显示在特定的图像?
第一张图片显示上,我想有一个悬停效果的图像......和第二图像做什么,我需要,但我只想说perticular图像上,并在这里是否显示在所有图像..
你可以发布你的完整html ..你定义'showcatdiv'类的部分 – bipen 2013-04-30 10:10:05
什么是'.showcatdiv'? pro3catProducts的父亲? – MMM 2013-04-30 10:13:28
另外,不要做'left:'200'px',这是错误的 - 摆脱引号 – MMM 2013-04-30 10:14:26