Provide window
, jQuery
and $
to node integrating jquery
, jsdom
and xmlhttprequest
.
Let's say you use npm, add "jquery-xhr" to dependencies section of package.js
require("jquery-xhr")
You can access like this
window.document
body = $("body")
Also $.ajax
, too.
$.ajax({
method: 'get',
url: 'http://www.yahoo.com',
success: function(r) {
console.log(r);
}
});
- use jquery 1.8.3 https://github.com/coolaj86/jquery
- support $.ajax using xmlhttprequest
- first release
MIT License