# jQuery.twStylesheet

This jQuery plugin allows the application of CSS rule sets to the document.

In contrast to jQuery's CSS methods, it applies styles to the document rather than to individual elements (just like defining a static style sheet in the document head).

The code is based on TiddlyWiki's dynamic style-sheet capabilities, where it is used to allow users to customize their documents on the fly.

## Source

The source code is currently hosted in TiddlyWiki's Subversion repository.

Feedback is welcome.

## API Summary

- `$.twStylesheet(css[, options])`: adds or replaces a style sheet

  `css` is a string containing the CSS rule sets, while `options.id` is an optional name identifying the style sheet, allowing co-existence of multiple style sheets

- `$.twStylesheet.remove([options])`: delete an existing style sheet

  The `options` argument is identical to `$.twStylesheet`'s.

(full documentation in the code comments)

## Demo

This will apply the CSS rule sets below to the entire document.
CSS