(New page: Here's an example of using jQuery in Ubiquity: // get the active document var doc = Application.activeWindow.activeTab.document; // find div.foo in the body of that document jQuery('div....) |
(Recommand to use CmdUtils.getDocument()) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
Here's an example of using jQuery in Ubiquity: | Here's an example of using jQuery in Ubiquity: | ||
// get the active document | <pre> | ||
var doc = | // get the active document in a secure way | ||
var doc = CmdUtils.getDocument(); | |||
// find div.foo in the body of that document | // find div.foo in the body of that document | ||
jQuery('div.foo', doc.body); | jQuery('div.foo', doc.body); | ||
</pre> | |||
Latest revision as of 00:35, 9 February 2009
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);