To not do so:
$('*') Is there any way to do this so that only elements that have the data- attribute (for example data-test, data-bla) are taken:
$('[data-*]') ?
To not do so:
$('*') Is there any way to do this so that only elements that have the data- attribute (for example data-test, data-bla) are taken:
$('[data-*]') ?
$("*").filter(function(){ var attributes = this.attributes; for (var i = 0; i < attributes.length; i++) { if (attributes[i].name.indexOf("data-")==0) return true; } return false; }); Here it is possible.
$.isEmptyObject(this.dataset) - GrundySource: https://ru.stackoverflow.com/questions/601015/
All Articles
filter- Grundy