English 中文(简体)
jj 查询转换未完成
原标题:jQuery transitions don t finish

因此我添加了一些转换到图像滚动:

$(document).ready(function(){
    $( .project ).hover(function(){
        $(this).children( .description ).stop().slideDown( fast );
    }, function(){
        $(this).children( .description ).stop().slideUp( fast );
    });
});

然而,描述框有时只向下滑过一半,甚至只有它应该滑过长度的十分之一...描述框是300x300px, 并且应该滑到300x300px的盒子里...

如果我很快地在.Project上徘徊, 停止()能否加入队列,

最佳回答

如果您想要立即完成动画, 请尝试 stop( true, true) , 如果您不想完成动画, 请尝试 < code> , 如果您不想完成动画, 只需翻转它。 第一个真理将清除队列, 这样动画就可以重新开始。 我不完全确定它为什么会出错, 我为无法给出更完整的答案而道歉, 但现在我无法查找它。 您可以在这里读更多关于它的内容 : < a href=" http://api.jquery.com/ stop/" rel= nofollow" > > http://api.jquery. com/stop/ < a>, 我发现 JQuary API 通常非常有用 。

问题回答

我创建了一个关于jsfidlehttp://jsfidle.net/gizmovation/TpqvT/

我能够让描述盒通过快速移动进入和离开项目容器而出现部分。

之所以发生这种情况,是因为 stop () 正在停止上一个动画, 然后您将开始一个新的动画 。 如在另一答案中提及的那样通过 < code> stop( true, true) < /code > 会让事情看起来更好一些 。

您是否对动画挂得完全不妥? 如果是这样的话, 修改我创造的拼图来更好地说明问题, 我们可以提供进一步的援助。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签