Entire Div into a link

Heres how to make the a entire Div “clickable” with some simple Javascript.

<div onclick="location.href='http://www.example.com';" style="cursor:pointer;"></div>

or for WordPress use this

<div id="header" onclick="location.href='<?php bloginfo('url');?>';" style="cursor:pointer;"></div>

Simple!

There are no comments yet, but you can be the first

Comments are closed.

19 Sep / 2011



Tags:


There is no tags