JSFiddle - React, Tailwind, and code Playground

by Marco Iamonte

HTML

<div data-type="move" >some text</div>

JavaScript

var previousDataValue = $("div").data("type");

$("div").removeAttr("data-type").attr("data-ty", previousDataValue);