use jQuery to replace one tag with another, keeping all attributes & data
<p>I realise this is similar to <a href="http://stackoverflow.com/questions/7093417/using-jquery-to-replace-one-tag-with-another">Using jQuery to replace one tag with another</a>, however I'm looking to replace a tag with another tag inside html, but KEEP the attributes and any defined custom data (set via $.data) for the object. Any idea how to achieve this?</p>
