JSFiddle - React, Tailwind, and code Playground
JavaScript
var counter = parseInt(1234);
$('*').each(function(){
var thiis = $(this),
dataAttr = thiis.data();
if (dataAttr) {
$.each(dataAttr, function(key, value) {
var newKey = parseInt(key) + counter;
thiis
.removeAttr('data-' + key)
.attr('data-' + newKey, value);
});
}
});