Skip to content

Instantly share code, notes, and snippets.

@indexzero
Created August 12, 2010 04:38
Show Gist options
  • Save indexzero/520317 to your computer and use it in GitHub Desktop.
Save indexzero/520317 to your computer and use it in GitHub Desktop.
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