欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery讓指定的元素閃爍顯示的方法

 更新時(shí)間:2015年03月17日 14:54:07   作者:上大王  
這篇文章主要介紹了jquery讓指定的元素閃爍顯示的方法,涉及jQuery操作css樣式的技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了jquery讓指定的元素閃爍顯示的方法。分享給大家供大家參考。具體如下:

這段jQuery代碼非常簡(jiǎn)單,功能就是讓指定的元素不斷的變換顏色,閃爍顯示,調(diào)用也非常簡(jiǎn)單。

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.dbjr.com.cn Then use the above function as:
$( '#importantElement' ).flash( '255,0,0', 1000 );

希望本文所述對(duì)大家的jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論