Labs/Ubiquity/jQuery in Ubiquity

From MozillaWiki
< Labs‎ | Ubiquity
Revision as of 00:35, 9 February 2009 by Lrbabe (talk | contribs) (Recommand to use CmdUtils.getDocument())
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here's an example of using jQuery in Ubiquity:

// get the active document in a secure way
var doc = CmdUtils.getDocument();

// find div.foo in the body of that document
jQuery('div.foo', doc.body);