How do I make an entire div
as hyperlink with the same URL as <a>
inside this div
? My jQuery is probably wrong.
<div>
<a href="some-url"></a>
</div>
var $href = $('div > a').attr('href');
$('div').on('click', function(event) {
$(this).location.href=$href;
})