How to make a clickable div

Making a clickable text or image is easy, just add the <a> tag surrounding it. But this doesn’t work with divs and sometimes we need a whole div to be clickable and not just text. The following code is for JQuery but switching it to your favorite JS framework should be very easy. First start by adding this to your div <div class="clickable"> </div> Now a little css to simulate the pointer on that div ...

October 25, 2009 · 1 min · 108 words · David Amador