Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Target Whole Element(s) to link
Old 10-07-2009, 10:56 AM Target Whole Element(s) to link
shonkyboy's Avatar
Extreme Talker

Posts: 226
Name: Chris
Location: West Yorks , UK
Trades: 0
Hi, I don't know if this is in exactly the right place - i think the answer will be a mixtrure of css and javascript - but here goes:
I have a series of boxes with links here : http://www.toolhire2day.co.uk/all-tool-hire
The text has a link to the desired section and so does the image - i would like to, however, have the whole box be a link - so if you click anywhere in the box it will take you to that page - i beleive that it is somethibng to do with a bit of javascript and [cursor: 'pointer'] or something like - does anyone know how to acheive this?
Many Thanks

Chris
__________________

Please login or register to view this content. Registration is FREE
shonkyboy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-07-2009, 11:34 AM Re: Target Whole Element(s) to link
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
At least with firefox, it's as easy as:
HTML Code:
<li class="woodworking" onclick="top.location='all-tool-hire/woodworking-tools'" stlye='cursor: pointer;'>
  <h3>
    <a target="" href="all-tool-hire/woodworking-tools">Hire Woodworking Equipment</a>
  </h3>
  <div class="hire-tool-img">
    <a class="no-arrow" href="all-tool-hire/woodworking-tools">
      <img src="/wp-content/uploads/2009/10/hire-woodworking-tn.jpg"/>
    </a>
  </div>
  <p>All your Woodworking and Joinery related tools for hire from Bench Saws to Clamps and Cramps to Planing and Sanding Tools</p>
  <p class="lnk"><a target="" href="all-tool-hire/woodworking-tools">Hire Woodworking Tools</a></p>
</li>
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 10-07-2009 at 11:35 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 10-09-2009, 08:25 AM Re: Target Whole Element(s) to link
shonkyboy's Avatar
Extreme Talker

Posts: 226
Name: Chris
Location: West Yorks , UK
Trades: 0
Many Thanks - thats worked a treat - It also seems to work in all versions of IE I have tested - even shonky ie6!
__________________

Please login or register to view this content. Registration is FREE
shonkyboy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Target Whole Element(s) to link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11416 seconds with 12 queries