[Project_owners] How to force Firefox in javascript to render :hover style

Gary Johnson gary.johnson.53 at gmail.com
Thu Oct 4 12:17:05 PDT 2007


When I go here

http://www.w3.org/TR/CSS2/selector.html#x39

it talks about this;

Note that the A:hover must be placed after the A:link and A:visited rules,
since otherwise the cascading rules will hide the
'color'<http://www.w3.org/TR/CSS2/colors.html#propdef-color>property
of the A:hover rule. Similarly, because A:active is placed after
A:hover, the active color (lime) will apply when the user both activates and
hovers over the A element.

which leads me to think that what you want as event priority and what gets
done as  event priority  may not be the same.  I vaguely remember working on
hover and what I think I ended up doing was defining different CSS classes
and changing the class of the object instead of trying to fiddle with the
internals of how CSS was going to work.

Or not, your mileage may vary


On 10/4/07, Didier Ernotte <didier at ernotte.com> wrote:
>
>  I would like to manually force Firefox, in javascript, to render the
> :hover CSS style of an object.
> I have tried to create an MouseEvent with the mouseover type, and dispatch
> the event to the object, but this only fires the onmouseover javascript
> scriplet on the object.
>
> evt.initMouseEvent("mouseover", true, true, window,....)
> node.dispatchEvent(evt);
>
> The rendering of the object stays the same. I know that I have defined a
> CSS style with the :hover pseudo-class on it, but Firefox does not fire an
> internal event to re-render the object with the pseudo-class CSS definition.
>
> Any idea ?
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>


-- 
I hope to be the kind of person my dog thinks I am.   :)>

http://mywebpages.comcast.net/adgj/
http://wwwCookDotCom.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20071004/b7cbe587/attachment.html 


More information about the Project_owners mailing list