Hi all,I couldn't find a good answer to this, although it has probably been answered before, apologies!
I have a link <a id="doit" href="/bla/something.php?id=123&type=456">do it</a> And some jQuery code $("#doit").click(function(){ // upon click $.get(this.href); // call the URL $('#doit').replaceWith("I've been there (<a href=/bla/something.undo.php?id=123&type=456'>undo</a>)"); return false; }); My problem is that I want to populate the URL that's in "replaceWith" with the correct id, depending on the id that was in the original link. I've thought of using a fake attribute in the link somehow (<a type="456" id="doit"), but I can't seem to get it to work, and I'm not sure this is the right approach... What would be the jquery-like best way to do this? Thanks! Peter -- me: http://petervandijck.com blog: http://poorbuthappy.com/ease/ global UX consulting: http://290s.com free travel guides: http://poorbuthappy.com Belgium: (+32) 03/325 88 70 Skype id: peterkevandijck