node package manager

can-jquery

can-jquery

Build Status

CanJS integrations for jQuery

API

can-jquery {jQuery}

Extensions to the event system so that can events and jQuery events are cross-bound. Importing can-jquery will return the jQuery object and wire up the event system.

var $ = require("can-jquery");
 
var div = $("<div>");
 
div.on("inserted", function(){
    // it inserted! 
});
 
$("body").append(div);

jQuery

can-jquery/legacy {jQuery}

Enables legacy integrations between CanJS and jQuery. Importing can/jquery/legacy will return the jQuery object. It will also import can-jquery so that the event system hooks are set up.

Additionally it will force element callbacks (such as those in [can-control]) to be jQuery wrapped.

var $ = require("can-jquery/legacy");

jQuery

Contributing

Making a Build

To make a build of the distributables into dist/ in the cloned repository run

npm install
node build

Running the tests

Tests can run in the browser by opening a webserver and visiting the test.html page. Automated tests that run the tests from the command line in Firefox can be run with

npm test