Jquery点击事件动画

标签 jquery

我正在使用 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/

相关文章:

javascript - jQuery `.parent().remove()` 不工作

javascript - Jquery帮助加载Json数据

javascript - 使用 jQuery 以红色和黑色闪烁文本

jQuery Mobile 在页面加载时打开弹出窗口

jquery - SVG url 光标不改变光标

javascript - Twitter Bootstrap 轮播指示器悬停效果

jquery - 使用剪辑路径在 div 上平滑动画

jquery - 使用 bxSlider 进行平移缩放不集中缩放

javascript - 解决点击操作按钮冲突的可能方法

javascript - 按名称的一部分查找数据属性