# jquery-loader

> jQuery loader for node.js

Latest version **2.1.1** (published 2014-10-29) · 0 weekly downloads

## Install

```sh
npm install jquery-loader
pnpm add jquery-loader
yarn add jquery-loader
bun add jquery-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2014-10-29 |
| First published | 2013-06-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Aditya |
| Maintainers | netroy |
| Keywords | util, dom, jquery |

## Links

- npm: https://www.npmjs.com/package/jquery-loader
- Repository: https://github.com/netroy/jquery-loader
- Issues: https://github.com/netroy/jquery-loader/issues
- npm.io page: https://npm.io/package/jquery-loader

## Dependencies (2)

- [jsdom](https://npm.io/package/jsdom.md) 1.0.3
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md) 1.6.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2014-10-29
- 2.1.0 — 2014-10-29
- 2.0.0 — 2014-08-06
- 1.2.0 — 2013-10-29
- 1.1.6 — 2013-10-29
- 1.1.5 — 2013-10-29
- 1.1.3 — 2013-10-29
- 1.1.2 — 2013-09-04
- 1.1.0 — 2013-09-04
- 1.0.1 — 2013-06-23

## README

[![NPM version](https://badge.fury.io/js/jquery-loader.png)](http://badge.fury.io/js/jquery-loader)
[![Build Status](https://api.travis-ci.org/netroy/jquery-loader.png?branch=master)](https://travis-ci.org/netroy/jquery-loader)

NOTE
====
Almost a fork for node-jquery, but rewritten because the jquery team is taking over maintaining the `jQuery` package [coolaj86/node-jquery#59](https://github.com/coolaj86/node-jquery/issues/59).


DOES NOT WORK ON WINDOWS
====
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](https://github.com/brianmcd/contextify) on windows please send me working instructions!

Installing.
====
`npm install jquery-loader`

Usage
---
```
    var $ = require('jquery').create();
```

Examples
---
```javascript
    $("<h1>test passes</h1>").appendTo("body");
    console.log($("body").html());
```

In Node.JS you may also create separate window instances

```javascript
    var jsdom = require('jsdom').jsdom
      , myWindow = jsdom().parentWindow
      , $ = require('jquery').create()
      , jQuery = require('jquery').create(myWindow)
      ;

    $("<h1>test passes</h1>").appendTo("body");
    console.log($("body").html());

    jQuery("<h3>second test passes</h3>").appendTo("body");
    console.log(jQuery("body").html());
```

Output:

```html
    <h1>test passes</h1>
    <h3>second test passes</h3>
```

You may also specify the version of jQuery you'd like to use
```javascript
    var $ = require('jquery')(null, '1.9');
```
Currently the version defaults to `1.10.1`.

Following versions are available -

* 1.6(.4)
* 1.7(.2)
* 1.8(.3)
* 1.9(.1)
* 1.10(.1)
* 2.0(.3)
* 2.1(.1)

JSONP Example
----

```javascript
    var $ = require('jquery');

    $.getJSON('http://twitter.com/status/user_timeline/treason.json?count=10&callback=?',function(data) {
      console.log(data);
    });
```

Building/Publishing to NPM
----
```
grunt && npm publish
```

---
_Source: https://npm.io/package/jquery-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
