Make entire DIV clickable without CSS

[html] <div class="myBox"> all up in myBox... <a href=""> is a link</a> </div> [/html] /* The following lines of jQuery will make the entire div clickable, but you can use CSS to change the cursor if your browser doesn't: */ [jQuery] $(".myBox").click(function(){ window.location=$(this).find("a").attr("href"); return false; }); [/jQuery]

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.