New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jQuery

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jQuery

jQuery: The Write Less, Do More, JavaScript Library (packaged for Node.JS)

  • 1.7.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

node-jQuery

A stupid-simple wrapper over jQuery for Node.JS (server). Currently 1.7.2.

Node.JS

npm install jQuery

var $ = require('jQuery');

Examples

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

In Node.JS you may also create separate window instances

var jsdom = require('jsdom').jsdom
  , myWindow = jsdom().createWindow()
  , $ = require('jQuery')
  , jq = require('jQuery').create()
  , jQuery = require('jQuery').create(myWindow)
  ;

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

jq("<h2>other test passes</h2>").appendTo("body");
console.log(jq("body").html());

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

Output:

<h1>test passes</h1>
<h2>other test passes</h2>
<h3>third test passes</h3>

JSONP Example

var $ = require('jQuery');

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

Keywords

FAQs

Package last updated on 01 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc