title: Add hyperlink to new image after onclick image change
body: <p>Im trying to add a hyperlink to an image after an onclick function was used to change the image. The onclick image change works but having a hard time with adding a link to the changed image.</p>
  
  <pre><code>&lt;div class="masonary16 ms mblogvid"&gt;&lt;img id="ms16" src="Images/img1.jpg" 
  height="100%" onclick="overimg(); imglink();"/&gt;&lt;/div&gt;
  
  
  
  function overimg() {
  document.getElementById("ms16").src = "Images/OVER/img2.jpg"; 
  }
  
  function imglink() {    
  var parentEl = document.getElementById("ms16").parent;
  var imgEl = parentEl.innerHtml;
  parentEl.innerHtml = '&lt;a href="http://www.google.com"&gt;' + imgEl + '&lt;/a&gt;';}
  </code></pre>
  
  <p>Thank you for your reply.</p>