How to change the tag name in the class on jquery

You can replace any HTML markup by using jQuery's .replaceWith() method.

If you want to keep the existing markup, you could use code like this:
$('#target').replaceWith('<newTag>' + $('target').html() +'</newTag>')

Comments