How do you make a div tag into a link. I would like my entire div to be clickable.
JS:
<div onclick="location.href='url'">content</div>
jQuery:
$("div").click(function(){ window.location=$(this).find("a").attr("href"); return false; });
Make sure to use cursor:pointer for these DIVs
cursor:pointer
1.4m articles
1.4m replys
5 comments
57.0k users