Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 90dd215 commit 2351e18ef6bd94cbe89f44a12e4fdfe7de925d1b @tmpvar committed Aug 19, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 README.md
View
@@ -20,4 +20,22 @@ see: [project site][] for additional information
[mjsunit.runner]: http://github.com/tmpvar/mjsunit.runner
[testlog]: http://github.com/tmpvar/jsdom/blob/master/test/testlog.txt
[plan]: http://github.com/tmpvar/jsdom/blob/master/PLAN.md
+
+
+# Examples
+
+## jQuery
+
+ var sys = require("sys"),
+ jsdom = require(__dirname + "/../../lib/jsdom"),
+ window = jsdom.jsdom().createWindow();
+
+ // this also works:
+ // jQueryTag.src = "http://code.jquery.com/jquery-1.4.2.js";
+ jsdom.jQueryify(window, __dirname + "/jquery.js", function() {
+ window.jQuery('body').append("<div class='testing'>Hello World, It works!</div>");
+ sys.puts(window.jQuery(".testing").text());
+ });
+
+

0 comments on commit 2351e18

Please sign in to comment.