javascript - How I can print the image when click the image link? -
<div class="grid col-220 cert"> <a href="images/1.jpg" class="certtop" rel="prettyphoto[certificates]"><img src="images/thumb/" /></a> <a href="images/1.jpg" class="certbottom" ><i class="fa fa-print"></i>certificate name </a> </div>
i want print 1.jpg when click class ".certbottom". how can with?
use jquery code:
$(document).ready(function() { $(".certtop").click(function () { $(this).append('<img src="images/1.jpg">'); }); });
Comments
Post a Comment