title: making a link using jquery on images
body: <p>I have a code where i need to create a href link to the images too. with the following screenshot</p>
  
  <p><a href="http://prntscr.com/iqo2ad" rel="nofollow noreferrer">http://prntscr.com/iqo2ad</a></p>
  
  <p>i tried it something like this: </p>
  
  <pre><code>$(document).ready(function() {
     var link = $(".car-image").find('li:first').find('a').attr('href');
     var appendtoimg = $('.car-image').closest('.img-responsive') - here i am stuck as i need to add an onclick event so it can work same as like &lt;a&gt; tag
  });
  </code></pre>