to access it, remove the data-at the beginnig of the attribute. ), colon (:) or underscore (_). and when fetched using jquery Thanks to the data- attributes we’ve added to our
  • elements, we can now display this information instantly without having to worry about making any Ajax calls and without having to make any server-side database queries. individuelle Attribute (z.B. For get an attribute’s value use the below syntax @Scott – the namespacing isn’t to create “site-specific” data attributes, but in-application namespacing. If you’re super keen to have a play with the new dataset property but disappointed that it hasn’t been implemented, fear not!, for there is a light at the end of the tunnel. I’m using within head tag. Die vier Kern Attribute, die auf den meisten HTML-Elemente verwendet werden können (wenn auch nicht alle) sind: 1. id 2. title 3. class 4. style The stored (custom) data can then be used in the page's JavaScript to create a more engaging user experience (without any Ajax calls or server-side database queries). With data-* attributes, you get that on/off ability plusthe ability to select based on the value it has at the same specificity level. javascript jquery html custom-data-attribute. Can we use the new dataset selector yet?! Although you can’t utilise the new JavaScript APIs just yet, you can enjoy great success using getAttribute and setAttribute safe in the knowledge that they will work in all major browsers. Entweder Sie lesen das Attribut mit getAttribute aus oder sie verwenden das eigens dafür geschaffene dataset. The Web Evolved: A new book on HTML5 & CSS3 by Richard Clark, Oli Studholme, Christopher Murphy and Divya Manian. } . HTML5 came with a number of new features. Custom data- attributes are a great way to simplify the storage of application data in your web pages. These attributes are completely optional; calling plugins manually and passing options directly is also supported. The datetime attribute represent a machine-readable format of a