How do you make a div tag into a link

JS:

<div onclick="location.href="https://stackoverflow.com/questions/1685078/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

Leave a Comment