So jquery api says the following:
Removing data from jQuery\'s internal .data() cache does not effect any HTML5 data- attributes in a document; use .
Sadly it is not possible in jQuery to select attribute names that starts with a given value (for attribute values it is possible).
The easiest solution i came up with:
$(document).ready(function(){
$('[data-loremIpsum], [data-loremDolor]').each(function(index, value) {
$(this).removeAttr('data-loremIpsum')
.removeAttr('data-loremDolor');
});
});
JsFiddle Demo (Make sure to look up the html source code after you clicked run)