Created
August 12, 2010 04:38
-
-
Save indexzero/520317 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jsdom = require('jsdom'), | |
sys = require('sys'); | |
// | |
// Remark: I have jsdom.createWindow working with complex HTML pages pulled from the wild intertubes :) | |
// | |
var window = jsdom.createWindow('<html><body><h1>Hello Server Side jQuery</h1></body></html>'); | |
jsdom.jQueryify(window, '/path/to/jquery.js', function () { | |
sys.puts(window.jQuery('h1')[0].innerHTML); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment