> I didn't quite get that
> this was not just an extension to jQuery but an actual part of the
> core.
It's both a generic module (reusable in any project) and a part of the
TiddlyWiki core (TW simply being a project making use of this module).
> What's the idea behind the object wrapper of the second param? Can
> there be multiple/different documents than the global one?
You can have multiple style sheets (essentially separate STYLE elements
in the document HEAD), each with its own ID via options.id.
The options.doc argument can be used to target a different document -
e.g. an IFRAME:
jQuery('<iframe id="foo" src="/index" />').appendTo(document.body);
var doc = jQuery("#foo").contents()[0];
var css = "body { background-color: #F00; }";
jQuery.twStylesheet(css, { doc: doc });
The options argument is an object for extensibility; should we decide
that other arguments are needed, we can define them as members of that
object rather than having to change the function signature:
http://www.learningjquery.com/2007/10/a-plugin-development-pattern
-- F.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en
-~----------~----~----~----~------~----~------~--~---