How does jquery flash the specified Element
This article mainly introduces jquery's method of making the specified elements flash and display. It involves jQuery's skills in operating css styles and is very useful. For more information, see
This example describes how jquery enables the specified element to flash and display. Share it with you for your reference. The details are as follows:
This jQuery code is very simple. The function is to enable the specified element to constantly change the color, flash the display, and call it very easily.
?
| 1 2 3 4 5 6 7 8 |
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.jb51.net Then use the above function: $ ('# ImportantElement'). flash ('2017, 255, 1000 ); |
I hope this article will help you with jQuery programming.