How to replace html
tag with new tag using jQuery?
I have many table
tags, and I want to replace a specific table containing a class. All of its child nodes must also be replaced.
<table class='replace_this'> <tr> <td> All table, tr, and td tag are replaced with div tag </td> </tr> </table>
Must be changed to:
<div class='replace_this'> <div> <div> All table, tr, and td tag are replaced with div tag </div> </div> </div>
source share