> Thanks for the pointer! Say, is there a way this functionality could > be integrated into jQuery itself?
Nope. > Can I chain like this? $.rule returns a Rule object with its own methods. I don't recall if the methods are chainable, maybe they are. > > Also consider that you may want to distinguish between one window's > document and another's, as in: The rules affects the page once it's added to a style or link. Whose window is that style/link from, is up to you. > These might be considered. Also in the demos it is unclear whether the > style rule is added to the FIRST tag called "style" or ALL of them, > since your page contains only one. This makes a difference, because > the style listed last in the document is the one that gets applied. That's why there is a documentation appart from the demo. The 2nd argument of the constructor is the context (just like with jQuery). The context can be a selector, a jQuery object, a stylesheet, etc. Cheers -- Ariel Flesler http://flesler.blogspot.com/