SyntaxFix
Write A Post
Hire A Developer
Questions
If you’re not opposed to jquery, this can be done in one line:
jQuery 1.7+
$("#myEl").off()
jQuery < 1.7
$('#myEl').replaceWith($('#myEl').clone());
Here’s an example:
http://jsfiddle.net/LkfLezgd/3/