0
我想在同一頁上使用2個jQuery對象,但是,我似乎無法讓它們同時工作,如果我玩弄代碼,我可以得到一個或另一個工作但不是在同一時間。我對這個東西很新,所以非常感謝你的幫助。在同一頁上運行2個jQuery
在頭部分的代碼如下
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js">
</script>
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$curtainopen = false;
$(".rope").click(function(){
$(this).blur();
if ($curtainopen == false){
$(this).stop().animate({top: '0px' }, {queue:false, duration:350, easing:'easeOutBounce'});
$(".leftcurtain").stop().animate({width:'60px'}, 2000);
$(".rightcurtain").stop().animate({width:'60px'},2000);
$curtainopen = true;
}else{
$(this).stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'});
$(".leftcurtain").stop().animate({width:'50%'}, 2000);
$(".rightcurtain").stop().animate({width:'51%'}, 2000);
$curtainopen = false;
}
return false;
});
});
</script>
非常感謝您的回答,因爲我對這個新東西可以請您進一步解釋如何在我的代碼中使用此功能。 – AppleTattooGuy
@JamesLeist您的非常歡迎...就像有整個文檔 –
非常感謝您的幫助 - 完美的工作! :-) – AppleTattooGuy