Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1455 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Triggering an element's hover event via another element

Thread title: Triggering an element's hover event via another element
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
08-06-2010, 12:43 PM
#6
Gaz is offline Gaz
Gaz's Avatar
Status: Request a custom title
Join date: Apr 2007
Location: UK
Expertise: Code & Programming
Software: Coda, TextMate, Sublime 2
 
Posts: 2,097
iTrader: 26 / 100%
 

Gaz will become famous soon enough Gaz will become famous soon enough

Send a message via Skype™ to Gaz

  Old

Originally Posted by BlaineSch View Post
Your code works fine for me... I tested in FF, IE6, and Chrome. Maybe clearing your cache?

I'd probably change the class though, I think defining colors in js would be complicated when switching themes etc.

You can just add to the "a:hover" to look something like "a:hover, a.hover" and add the class "hover" and then remove it etc.
Oh does it? I'll have another check (it was 4am after all!). I agree, adding a class would be better. Thank you

Ahh, I see what I did wrong. I didn't put # before the colour hex code!

Originally Posted by Fez View Post
hey yeah, you can do that very simply

Code:
.forum:hover > a {

}
Be warned, IE6 wont support hovers on elements other that links.
I thought of that way, but tend to stick away from it, because of the whole "unsupportedness" of it, but thanks anyway!

Reply With Quote
     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed