我正在使用 jQuery 动画。我需要在网站打开时自动启动动画。 但在这个 jQuery 程序员中放置了 Click 函数。我想去掉点击功能。但 删除该功能后,所有动画都会停止。
http://web.enavu.com/tutorials/curtains-opening-animation-with-jquery/
最佳答案
我假设你正在谈论这个:
// when user clicks inside the container...
$('.curtain_wrapper').click(function(){
//..animate the description div by changing it's left position to it's width (but as negative number)...
$(this).children('.description').animate({'left': -1*$(this).width()});
//...animate the 2 curtain images to width of 50px with duration of 2 seconds...
$(this).children('img.curtain').animate({ width: 50 },{duration: 2000});
//...show the content behind the curtains with fadeIn function (2 seconds)
$(this).children('.content').fadeIn(2000);
});
尝试更改 click
一词,表示 each
:
$('.curtain_wrapper').each(...
关于Jquery点击事件动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3279291/