Top "Html5-data" questions

HTML 5 custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.

store and retrieve javascript arrays into and from HTML5 data attributes

How can a javascript Array be stored in an HTML5 data attribute? I've tried every variation of JSON.stringifycation and …

javascript jquery arrays parsing html5-data
Using jQuery to get data attribute values with .each()

I have the following HTML with data attributes - I want to write some jQuery that will loop through the …

javascript jquery each html5-data
How to remove data-* attributes using HTML5 dataset

According to the dataset spec, how is element.dataset meant to delete data attributes? Consider: <p id="example" data-a="…

javascript web-standards html5-data
How to do data- attributes with haml and rails?

I can have %a{href: '#', data_toggle_description_length: 'toggle_me_ajax'} which it gives me underscores not …

ruby-on-rails ruby-on-rails-3 haml custom-data-attribute html5-data
Are empty HTML5 data attributes valid?

I'd like to write a simple jQuery plugin that displays inline modals under specified elements. My idea is for the …

html custom-data-attribute html5-data
jQuery accessing html5 data attribute

On click of one of the options I am trying to get the data value from the 'ul li a' …

jquery html5-data
How to add HTML5 data- attributes to a rails form label tag?

I have a rails form that has this code: <%= form_tag("../vehicles", method: "get") do %> <div> &…

html ruby-on-rails forms html5-data
Inserting custom data attributes into JQuery DataTables

Problem: I am using JQuery DataTables v1.10 for a work-related project. The project requires a Datatable to be defined and …

jquery jquery-datatables custom-data-attribute html5-data
Set background with value of data attribute

I've 16 different section-tags. Every section-tag have a data- attribute to set a specific background-color for each section: <section data-color="#…

jquery html css html5-data