日期:2014-05-16  浏览次数:20302 次

隐藏和显示层的问题,为什么会没现象呢?
<LINK href="../css/tab_menu.css"type="text/css" rel="stylesheet">
<script src="../js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script>
$(function() {$("#bb").mouseover(function() {
$(".xiangce_1").css("display","block");}); });

</script>
.xiangce_1 {
position:absolute;
top:238px;
display:none;
}


<p>
<a href="#" id="bb">形象杂志</a>
</p>


<div style="width:1423px;" class="xiangce_1">
<br />
<br />
<span><img src="../../img/tu_01.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_01.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_01.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_01.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_01.jpg"/></span>&nbsp;&nbsp;&nbsp;
<br />
<p>
<span><img src="../../img/tu_02.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_02.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_02.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_02.jpg"/></span>&nbsp;&nbsp;&nbsp;
<span><img src="../../img/tu_02.jpg"/></span>&nbsp;&nbsp;&nbsp;
</p>
</div>
上面的代码哪里错了??怎么会没有显示隐藏层的呢?

------解决方案--------------------
$(function () {
$("#bb").mouseover(function () {
$(".xiangce_1").css("display", "block");
});
});
如果有冲突,那你可以用var j=jQuery.noConflict();
然后这样用:
j(function () {
j("#bb").mouseover(function () {
j(".xiangce_1").css("display", "block");
});
});