本文实例讲述了jquery让指定的元素闪烁显示的方法。分享给大家供大家参考。具体如下:
这段jQuery代码非常简单,功能就是让指定的元素不断的变换颜色,闪烁显示,调用也非常简单。
jQuery.fn.flash = function( color, duration )
{
var current = this.css( 'color' );
this.animate( { color: 'rgb(' + color + ')' }, duration / 2 );
this.animate( { color: current }, duration / 2 );
}
// http://www.uoften.com Then use the above function as:
$( '#importantElement' ).flash( '255,0,0', 1000 );
希望本文所述对大家的jQuery程序设计有所帮助。
最后
以上就是儒雅柠檬最近收集整理的关于jquery让指定的元素闪烁显示的方法的全部内容,更多相关jquery让指定内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复