In what instance would trigger() be useful....an example to show its use | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In what instance would trigger() be useful....an example to show its use

1st Jan 2017, 7:16 PM
Mark
Mark - avatar
2 Answers
+ 8
For example: you put a "click" event on an item, its code will be executed only when the specific item is clicked, if you want other elements to execute that code too, you could tell them to trigger() the "click" event of that item instead of rewriting the code...
1st Jan 2017, 7:52 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
thanks @valentinhacker
3rd Apr 2017, 8:36 PM
Mark
Mark - avatar