Set all link targets for a page
- by zac
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..
$("#myDiv 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.