I've been looking for a way to use jQuery to translate HTML. For instance, I would like to change
<myTag name1="sally" name2="billy" datingFor="3" />
<myTag name1="jill" name2="tom" datingFor="4" />
to another form such as
<div>SALLY has been dating BILLY for 3 months</div>
<div>JILL has been dating TOM for 4 months</div>
using a jQuery function that executes after the document is ready.
Is there an easy way to do this? I know I can use something like $('#div').html('New Text') but this approach doesn't seem applicable when I have parameters (such as the name or datingFor fields).
.attr()docsmyTagelements as xml content or as a string?