jQuery loader for node.js
Almost a fork for node-jquery, but rewritten because the jquery team is taking over maintaining the
jQuery package coolaj86/node-jquery#59.
Many people are having problems getting this module to work on windows. The failure has to do with building contextify on window. It seems to be a windows environment issue. I don't have access to a windows machine so I cannot explore working through the windows install process. If you figure out how to build contextify on windows please send me working instructions!
npm install jquery-loader
var $ = require('jquery').create();
In Node.JS you may also create separate window instances
var jsdom = require'jsdom'jsdommyWindow = jsdomparentWindow$ = require'jquery'createjQuery = require'jquery'createmyWindow;$"<h1>test passes</h1>"appendTo"body";console.log$"body"html;jQuery"<h3>second test passes</h3>"appendTo"body";console.logjQuery"body"html;
test passessecond test passes
You may also specify the version of jQuery you'd like to use
var $ = require'jquery'null '1.9';
Currently the version defaults to
Following versions are available -
var $ = require'jquery';$getJSON'?'console.logdata;;
grunt && npm publish