您如何使元素“闪光"?在jQuery中 [英] How do you make an element "flash" in jQuery

查看:60
本文介绍了您如何使元素“闪光"?在jQuery中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是jQuery的新手,并且有一些使用Prototype的经验.在Prototype中,有一种方法可以刷新"元素—. IE.短暂地用另一种颜色突出显示它,并使其褪色恢复正常,以便吸引用户的眼球. jQuery中有这种方法吗?我看到了fadeIn,fadeOut和动画效果,但是看不到"flash"之类的东西.也许这三者之一可以与适当的输入配合使用?

I'm brand new to jQuery and have some experience using Prototype. In Prototype, there is a method to "flash" an element — ie. briefly highlight it in another color and have it fade back to normal so that the user's eye is drawn to it. Is there such a method in jQuery? I see fadeIn, fadeOut, and animate, but I don't see anything like "flash". Perhaps one of these three can be used with appropriate inputs?

推荐答案

我的方式是.fadein,.fadeout .fadein,.fadeout ......

My way is .fadein, .fadeout .fadein, .fadeout ......

$("#someElement").fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);

这篇关于您如何使元素“闪光"?在jQuery中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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