jQuery/javascript replace tag type

jQuery.replaceTagName The following is a jQuery plugin to replace the tag name of DOM elements. Source (function($) { $.fn.replaceTagName = function(replaceWith) { var tags = [], i = this.length; while (i–) { var newElement = document.createElement(replaceWith), thisi = this[i], thisia = thisi.attributes; for (var a = thisia.length – 1; a >= 0; a–) { var … Read more