title: Dynamically adding target attribute to a collection of pre-existing anchor tags within a known div element
body: <p>I have a div with id="images". </p>
  
  <p>The div contains some images that are each wrapped in an anchor tag with no target attribute. </p>
  
  <p>I'd like to insert script into my page that pulls a reference to each of these anchor elements and ads a target="new" attribute to them (in the runtime) so that when they are clicked they each open in a new window. </p>
  
  <p>I don't want to hardcode the target attributes on the anchor tags. This is a post deployment workaround. I'm not using jquery in this application.</p>
  
  <pre><code>&lt;div id="images"&gt;&lt;a href=""&gt;&lt;img src="foo.png" /&gt;&lt;/a&gt;...etc &lt;/div&gt;
  </code></pre>