carlos-sanchez
11/15/2013 - 12:23 AM

Make entire div clickable, Here’s an easy way to make the parent div of a link clickable.

Make entire div clickable,

Here’s an easy way to make the parent div of a link clickable.

$(".myBox").click(function(){
     window.location=$(this).find("a").attr("href"); 
     return false;
});
<div class="myBox">
     blah blah blah.
    <a href="http://google.com">link</a>
</div>