Proposed Solution:
$(".myBox").click(function(){
window.location=$(this).find("a").attr("href");
return false;
});
Looks for a link inside div with class of "myBox". Redirects to that links value when anywhere in div is clicked.
Reference HTML:
<div class="myBox">
blah blah blah.
<a href="http://google.com">link</a>
</div>
Simpler Solution:
<div onclick="location.href='#';" style="cursor: pointer;">
</div>
Reason For Complexity:
1) Browsers do not follow standards. divs cannot be clickable in Internet Explorer.
2) What if the user has javascript turned off? You may still want the link to work.
How Can We Simplify:
1) We should actively work towards making browsers work as they should. HTML5 is supposed to do this but already there are differences in implementation. If we work together we can make things simpler.
If you have any tips or tricks to make anything less complex or less complicated or have an explanation on why things are complicated please email them to me at chrisw_88@outlook.com and we will post them here.