Use jQuery to change an HTML tag?
jquery
Solution
Once a dom element is created, the tag is immutable, I believe. You'd have to do something like this:
$(this).replaceWith($('<h5>' + this.innerHTML + '</h5>'));
Problem
Is this possible? example: ``` $('a.change').click(function(){ //code to change p tag to h5 tag }); <p>Hello!</p> <a id="change">change</a> ``` So clicking the change anchor should cause the `<p>Hello!</p>` section to change to (as an example) an h5 tag so you'd end up with `<h5>Hello!</h5>` after the click. I realize you can delete the p tag and replace it with an h5, but is there anyway to actually modify an HTML tag?