<script type="text/javascript" src="jquery/jquery-1.7.1.min.js"></script> <script type="text/javascript"> function init() { $(".simBox").click(function(){ window.location=$(this).find("a").attr("href"); window.open($(this).find("a").attr("href")); return false; }); $(".simBox").mouseover(function(){ $(this).addClass("simBoxOver"); }); $(".simBox").mouseout(function() { $(this).removeClass().addClass("simBox"); }); } $(document).ready(function() { init(); }); </script> </head> <body> How do I...<br><br> <div class="simBox"><a href="about:blank">Enrol in elearning?</a></div>
Src: http://css-tricks.com/snippets/jquery/make-entire-div-clickable/
Tech Reference: jQuery
Leave a Reply