我正在使用jquery在頁面底部顯示動畫MSN窗口。jquery.hide問題
jQuery代碼:
$(document).ready(function() {
$(" .inner").stop().animate({height:'142px'},{queue:false, duration:600});
$(' .close').click(function(event) {
$(' .inner').hide();
});
$(' .inner').click(function() {
location.replace("somepage.php");
});
});
的CSS:
.close {height:14px; z-index:100; position: absolute; margin-left:174px; margin-top:12px; border:1px solid #F00;}
.inner {position:absolute;bottom:0;width:201px;height:117px;right: 0; margin-right:10px; float:left; z-index:-1; display:block; cursor:pointer;}
的HTML:
<div class="inner"><div class="close"><img src="img/close.png" width="9" height="8" /></div><img src="img/window.png" width="201" height="117" /></div>
,我有這段代碼的問題是,關閉按鈕(在顯示.inner DIV的右上角)無法激發Jquery .hide函數。
爲什麼?
謝謝rahul!這是解決方案... – Sergio 2010-04-14 12:38:00