Home > Web Front-end > JS Tutorial > body text

Sharing usage examples of jquery operating HTML5 data-*_jquery

WBOY
Release: 2016-05-16 16:39:28
Original
1182 people have browsed it

After reading the detailed specifications of HTML5, you will find that the usage of this custom data attribute is very simple. That is, you can add any attribute starting with "data-" to the HTML tag. These attributes will not be displayed on the page. , it will not affect your page layout and style, but it is readable and writable.

This method is already built into jquery. Data can be obtained through $('#content').data('list');. This method appeared after jQuery version 1.4.3, and it can return the corresponding data attribute. .





Usage of jquery to operate HTML5 data-*

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template