Top "Custom-data-attribute" questions

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.

SelectListItem with data-attributes

Is there anyway to have a SelectList prepopulated on ViewModel with data-attributes ? I want to do @Html.DropdownListFor(m=> …

asp.net-mvc html html-helper custom-data-attribute selectlist
Get custom data-attribute in select2 with <select>

Let's assume you have the following HTML5 <select id="example"> <option value="AA" data-id="143">AA</…

html jquery-select2 custom-data-attribute
How to get, set and select elements with data attributes?

I'm having some trouble with data-attributes, I can't get anything to work for some reason so I must be doing …

jquery jquery-selectors custom-data-attribute
what is the purpose and usage of data-value, data-title, data-original-title, original-title, etc.?

I've been seeing these attributes around on more modern websites like GitHub and such, and they always seemed to coincide …

html custom-data-attribute
How to use 'If $(this) has data-attribute'

I'm with a little problem. I've got a few buttons, each with a different data-function="" attribute. I want to execute …

jquery if-statement comparison custom-data-attribute
Get data-attribute jquery vs javascript

I have a custom data-attribute set by default: data-equipment="0" If i change it with jquery using .data() $(this).data("equipment", 10) …

javascript jquery custom-data-attribute
Difference between href and data-href in anchor tag in html

What is the difference between href and data-href attribute in html <a></a> tag? My current …

html custom-data-attribute
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
show and hide elements based on data-* attribute

This seems like it should be trivial for JQuery to do, but this function is hiding the whole form... can …

jquery show-hide custom-data-attribute