indexzero
8/12/2010 - 4:38 AM

gistfile1.js

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);
});