C
ckirchho
Hello,
I created some css link buttons. I defined some different values for
the active pseudo class of those links, so they have the visual
appearance of a button that is pressed down.
Now if I press the mouse button on a link, keep it pressed, move the
mouse out of the link's area and release the button, the link stays
active. I have to click somewhere else in the document to take away
the active state of that link.
I would like to let JavaScript do that automatically. So when the body
of the document is loaded, I search for all a elements. If they have a
specific class, I attach an onmouseout event to them. In the
onmouseout event I tried dispatching a click event on the document,
but that doesn't do the trick.
Is there any other method to achieve the desired behaviour?
Best regards,
Christian Kirchhoff
I created some css link buttons. I defined some different values for
the active pseudo class of those links, so they have the visual
appearance of a button that is pressed down.
Now if I press the mouse button on a link, keep it pressed, move the
mouse out of the link's area and release the button, the link stays
active. I have to click somewhere else in the document to take away
the active state of that link.
I would like to let JavaScript do that automatically. So when the body
of the document is loaded, I search for all a elements. If they have a
specific class, I attach an onmouseout event to them. In the
onmouseout event I tried dispatching a click event on the document,
but that doesn't do the trick.
Is there any other method to achieve the desired behaviour?
Best regards,
Christian Kirchhoff