我有相同的類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