I would like to change all the names of the attributes where class=\"testingCase\" throughout all my whole html document.
e.g. Change:
&
Here's a simple jquery-style plugin that gives you a renameAttr method:
// Rename an entity attribute
jQuery.fn.renameAttr = function(oldName, newName) {
var args = arguments[0] || {};
var o = $(this[0])
o
.attr(
newName, o.attr(oldName)
)
.removeAttr(oldName)
;
};
There is also this example which adds an option to remove the data for the old attribute.