You may often see that some HTML has data attributes, which are custom attributes of HTML5. They can do a lot of things. It is very convenient to call JS directly. Although it is an HTML5 attribute, fortunately, jQuery is universal, so it can be used normally in all browsers, including the lower version of IE. Here is a brief introduction to how to use it:
1. Simple use
Copy the code