I'm encountering a related situation, and perhaps you will have an
idea for me to try. I'm storing an element's background color when a
Google map marker is opened, and then return it's original background
color when the marker's info window is closed.
This works, but unfortunately once the background color is restored,
it no longer has it's "hover" background color. My guess is that
marker.communityBlock.setStyle('background-color', '#D7E3EF');
wipes out the color set by an :hover rule in the CSS file?
Any ideas on how to store and retrieve both the hover and default
background colors? (Preferably not an answer like, "just store
whatever property those are stored in" - if I knew of such a property,
I wouldn't be asking the question! :-) )
On Jun 3, 6:23 am, Oskar Krawczyk <[email protected]> wrote:
> Although, if you're replacing the default properties with new values than
> you're better off with Ryan's solution.
> __
>
> Oskar Krawczykhttp://nouincolor.com
>
> On Wed, Jun 3, 2009 at 12:21, Oskar Krawczyk <[email protected]>wrote:
>
> > Using el.getStyles() you can define which styles are to be fetched– set the
> > ones that are not extended by the :hover state.
>
> > O.
> > __
> > Oskar Krawczyk
> >http://nouincolor.com
>
> > On Wed, Jun 3, 2009 at 12:10, ryan <[email protected]> wrote:
>
> >> You could store the style (Element.store()), and then retrieve
> >> (Element.retrieve()) on hover?
>
> >> On Jun 2, 10:30 pm, ankit <[email protected]> wrote:
> >> > One problem that I have faced consistently is that whenever I am
> >> > hovering over a link and I try and get that element's style
> >> > attributes, I get it's 'a:hover' properties. Instead, what I want is
> >> > to get the 'a' style attributes and not 'a:hover'.
>
> >> > Is there any way I could get the link's style attributes ( a and not
> >> > a:hover ) when I'm hovering over it?
>
> >> > When it's the other way round, i.e. when I'm hovering over a link and
> >> > I try and set it's style attributes, then a's style attributes are set
> >> > and not a:hover's.