What is the best practice to make a div into a link?

Bond.inc

New Member
I've got a little issue here. I've got a \[code\]div\[/code\] with \[code\]h1, h2 and p\[/code\]. I want to make the div into a link, but I can't just wrap a \[code\]<a>\[/code\] around a div or h1, h2, p. That's not the correct way, but what should I do to make the whole div into a link?Should I make every element into a \[code\]span\[/code\]? This would require a lot more work\[code\]<a href="http://stackoverflow.com/questions/14560166/#" class="link"> <span class="div"> <span class="h1"></span> <span class="h2"></span> <span class="p"></span> </span></a>\[/code\]or should I use javascript:\[code\]$('.link').click(function(){ document.location.href='http://stackoverflow.com/questions/14560166/#';})\[/code\]
 
Back
Top