我想执行$(“绳”)。自动点击()函数页面完全加载后。触发onClick();在页面加载
<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'}, 4500);
$(".rightcurtain").stop().animate({width:'60px'},4500);
$curtainopen = true;
}else{
$(this).stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'});
$(".leftcurtain").stop().animate({width:'50%'}, 4500);
$(".rightcurtain").stop().animate({width:'51%'},4500);
$curtainopen = false;
}
return false;
});
});
</script>
请帮忙。
相反评论每个答案的,我在这里告诉你:'.trigger(“点击”)'快'是。点击()'。 –