Klaus Hartl wrote:
howard chen schrieb:

sorry, a:hover is just an example, what i want is to style pseudo
class, such as a:visited, a:active etc....

There are no properties in JavaScript that represent these pseudo classes, thus it cannot be done.

However, as long as what you want is not too dynamic and you can add CSS rules to handle them, you can have

CSS:
    a.class1:visited { /* whatever */ }

JS:
    $("a").each(function() {
       $(this).addClass("class1");

       // do the rest
    )

to achieve the same effect. I believe there are techniques to modify the current stylesheets too, but they are difficult to do correctly cross-browser.

Good luck,

 -- Scott

Reply via email to