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>'));
More Related Contents:
- What does jquery $ actually return?
- Full path from file input using jQuery
- Is there a native jQuery function to switch elements?
- Cursor position in a textarea (character index, not x/y coordinates)
- ng-click not working from dynamically generated HTML
- difference between prop() and attr() in jQuery and when to use attr() and prop() [duplicate]
- Is it possible to use jQuery to get the width of an element in percent or pixels, based on what the developer specified with CSS?
- How to return JSON from a 2.0 asmx web service
- How an I get all form elements (input, textarea & select) with jQuery?
- Jquery get input array field
- How to get input type using jquery?
- How to use jQuery to add form elements dynamically
- Should one replace the usage addJSONData of jqGrid to the usage of setGridParam(), and trigger(‘reloadGrid’)?
- How to close jQuery Dialog within the dialog?
- jQuery select by class VS select by attribute
- Weird Chrome prototype/jQuery conflict
- jQuery/CSS: line-height of “normal” == ?px
- Why jQuery does not work on my home (local) machine?
- File upload using MVC 4 with Ajax
- jquery – Read a text file?
- How to Parse XML Cross-domain in jQuery?
- Trying to make multiple background images cycle through a slideshow with CSS and JQUERY
- jQuery – Check if DOM element already exists
- jQuery – keydown / keypress /keyup ENTERKEY detection?
- how to avoid cross domain policy in jquery ajax for consuming wcf service?
- Cleanest way to get the next sibling in jQuery
- How to delay jquery animation?
- Basic how-to for cross domain jsonp
- Toggle width with jQuery
- jQuery validate plugin : accept letters only?