Make an entire div clickable with jQuery

1Comments

jQuery

$("someDiv").click(function(){
     window.location=$(this).find("a").attr("href");
     return false;
});


HTML

<div id="someDiv">
     This is some of the div's content.
    <a href="http://google.com">The Link</a>
</div>