I have links that are dynamically generated and I need to set the target for all of them. How could I do this with javaScript. I found something that looks like it should work using jQuery..
$("a").attr('target', '_top');
but I dont want to use a library for this and I imagine a couple of lines of javaScript would take care of it... I just dont know how to write it.
To further clarify what I am doing, the links are being generated with javaScript and a recommendation engine, ATG, and I am calling this in an iframe that I need to break out of to the top. I guess what I need is just a way to define all the links in the DOM, it does not have to be attached to a particular id. Is it possible to attach a dynamically generated attribute to a dynamically generated link? There is the possibility of building a custom render but I hope to avoid that route.