[Typo3] link on <td> in tmenu_layers

Sander (AlterNET) sander at alternet.nl
Thu Jun 30 15:55:40 CEST 2005


Jochen Stange wrote:
> Hi NG.
> 
> I'm trying to achive a mouseover effect for a tmenu_layers object:
> 
> All menuitems are aligned top to bottom in a table. Each cell has a white 
> background and should change the background on mouseover:
> wrap = <tr><td class="tdout" onmouseover="this.className='tdover;" 
> onmouseout="this.className='tdout'">|</td></tr>
> 
> That's the effect I want, but now the user might get the idea that wherever 
> there is mouse interaction (over+out) he's in an active region and tries to 
> klick...
> Obviously the link is only on the text thus letting the menu disappear 
> without calling the link.
> 
> My idea is to do something like: <td class="tdout" .... 
> onClick="LinkFunction(ID)"> so I can set the link in JS. Therefore I'd need 
> the current ID that goes into the link. => How do I read the current ID from 
> a tmenuItem?
> 
> Is there another way to do this? (I used a gmenu before, but the 
> textrendering was bad ...)
> 
> Thanks for any help,
> cheers, Jochen 
> 
> 

Jochen,

How about putting a <span> or <div> around your link and styling it with 
css? Like that you can specify a width and height, (display: block 
first!), then set text-color and bgcolor on a:hover :)

Sander.



More information about the TYPO3-english mailing list