Make an entire div clickable with jQuery
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>






One comment
Post your own
Great information! I’ve been looking for something like this for a while now. Thanks!