源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jquery让指定的元素闪烁显示的方法

  • 时间:2020-08-09 11:34 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jquery让指定的元素闪烁显示的方法
本文实例讲述了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.1sucai.cn Then use the above function as:
$( '#importantElement' ).flash( '255,0,0', 1000 );
希望本文所述对大家的jQuery程序设计有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部