I saw the following link code in the source code of a web page:
Click to view contact information
Could you please tell me about data-target and data in What does the -toggle attribute mean? I searched online for a long time and couldn't find that has these two attributes!
Zhao Liang (Bi Hai Qing Tian): This is a custom attribute. You can add custom attributes to element tags in this way, and then use these attributes of the element in JS. For example, data-target='#contact_modal' here specifies the ID of the DIV or other display element where the contact information is to be displayed. When displaying, the attribute of the A link will be taken first to know the object it specifies, and then in that object Just display the information. data-toggle='modal' means that the way to display information is a modular way that dominates the focus. Since they are writer-defined attributes, why can I know their function? That is the writing specification of custom attributes. Good writing specifications can play this role.
Customized
How to customize attributes, in CSS?
How to customize attributes, in CSS?
.
??jquery? For example: data-toggle="dropdown" represents??dropdown ???Reply
Thanks to everyone above for your answers.