How can jquery trigger the effect every few seconds?
Editor to share with you how to achieve jquery every few seconds to trigger the effect, I believe that most people do not understand, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
In jquery, you can use the "setTimeout ()" method to trigger the effect after a few seconds, which is used to call a function or evaluate an expression after a specified number of milliseconds, with the syntax "setTimeout (code to be executed, millisecond wait time);".
The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.
In jquery, you can use setTimeout () to trigger the effect every few seconds, and the setTimeout () method is used to call a function or evaluate an expression after a specified number of milliseconds.
The syntax is:
SetTimeout (code, milliseconds, param1, param2,...) setTimeout (function, milliseconds, param1, param2,...)
Where:
Examples are as follows:
one hundred and twenty three
Click the button and "Hello" pops up after 3 seconds.