"飞&中QUOT;动画与jQuery [英] "Fly-in" animation with jQuery

查看:167
本文介绍了"飞&中QUOT;动画与jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的网站上自动完成,并且当用户从它选择一个项目它被添加到右边的标记列表。我想使它明显,自动完成选择已经添加到列表中的令牌。我如何使用jQuery动画清楚发生这种情况?

I have an autocomplete on my site, and when a user selects an item from it it is added to a token list on the right. I would like to make it obvious that the autocomplete selection has been added to the token list. How can I use jQuery to clearly animate this occurring?

我在想,也许的具有文本飞来标记区域,但我接受任何会做出很明显的用户令牌已添加工作。其他选项包括闪烁的令牌当它出现时,或者弹出一个提示出现。欢迎对什么是最有效的投入,并在那里我能找到的文档。

I was thinking of maybe having the text "fly in" to the token area, but I'm open to whatever would work well in making it obvious to users that the token has been added. Other options include flashing the token when it appears, or popping up a tooltip there. Would welcome input on what would be most effective, and where I can find documentation.

推荐答案

所需的飞行动画并不难实现。
你只需要使用动画与设置:

The desired fly-animation isn't hard to realize. You just have to use animate with settings of :


  1. 的位置是:绝对

  2. 顶:(目标顶部)

  3. 左:(左目标)

在回调设置位置回到'静态'和从一个节点转移项目到其他。

on callback you set position back to 'static' and transfer the item from one node to the other.

做了一个小例子:<一href=\"http://jsfiddle.net/doktormolle/adcvK/\">http://jsfiddle.net/doktormolle/adcvK/

Made a little example: http://jsfiddle.net/doktormolle/adcvK/

这篇关于&QUOT;飞&中QUOT;动画与jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆