I\'m storing some custom data in HTML5 data attribute for Jquery processing. will the custom data attribute available in Older browsers?
The attribute itself will work in all browsers. It's just an attribute after all. This would "work" in the sense that the attribute will exist in the DOM:
The native dataset
property of elements will not work in older browsers, but getAttribute
will:
var random = document.getElementById("x").dataset.random;
// or
var random = document.getElementById("x").getAttribute("data-random");