Quantcast
Channel: Clive Ciappara - Developer for Apps & Websites » Quickie
Viewing all articles
Browse latest Browse all 13

Div OnClick instead of a href | Quickie

$
0
0

Instead of using the “<a href=” tag to go to another page, you can use the “<div onclick=” to be transferred to another page. This is extremely useful if you have a lot of text and pictures that need to be clicked anywhere wanted. Next is the html code to achieve this:

<div id="div_id" onclick="window.location = 'Your reference here'>
Your text here
</div>

Hope this Quickie was of help ;)


Viewing all articles
Browse latest Browse all 13

Trending Articles