The bind () function is used to bind processing functions to events of each selected element. If you are interested, you can understand its syntax bind (type, [data], fn ), the parameter data is used as the event. the data property value transmits additional data objects of objects. I hope this will help you to learn more.
1. bind () functionBind a handler for each event of the selected element. The syntax is as follows: bind (type, [data], fn)
Type is one or more types of strings, such as click or change, which can also be customized; types that can be called by type include blur, focus, load, resize, scroll, unload, click, dbclick, and mousedown. The parameter data is an extra data object that is passed as the event. data property value. The fn parameter is the processing function bound to the event of each selected element.
2. Sample Code:
The Code is as follows:
Bind method binding event