title: How to use jQuery with jsdom@5?
body: <p>I am migrating from node.js to io.js and my old node.js code does not work with jsdom@5.</p>
  
  <pre><code>var jsdom=require('jsdom');
  var $=require('jquery')(jsdom.jsdom().createWindow);
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>/tmp/iojs/node_modules/jquery/dist/jquery.js:28
                                  if ( !w.document ) {
                                         ^
  TypeError: Cannot read property 'document' of undefined
      at module.exports (/tmp/iojs/node_modules/jquery/dist/jquery.js:28:12)
      at Object.&lt;anonymous&gt; (/tmp/iojs/test.js:2:24)
      at Module._compile (module.js:431:26)
      at Object.Module._extensions..js (module.js:449:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:311:12)
      at Function.Module.runMain (module.js:472:10)
      at startup (node.js:124:18)
      at node.js:959:3
  </code></pre>
  
  <p>I am using latest <code>io.js v2.0.1</code>, <code>jsdom@5.4.1</code> and <code>jquery@2.1.4</code>. </p>
  
  <p>What is the right way to use jQuery with jsdom@5?</p>