bruth / synapse

Hooks to support data binding between virtually any object.
http://bruth.github.com/synapse/docs/
BSD 2-Clause "Simplified" License
150 stars 6 forks source link

Create closure for jQuery global around jQuery hook #23

Closed Rodeoclash closed 12 years ago

Rodeoclash commented 12 years ago

The jQuery hook relies on jQuery being available in the global namespace under the "$" object. This breaks when noConflict is used. References to the jQuery object should also be contained in a closure, e.g:

(function($) { // hook code here })(jQuery)

This will also accomodate the jQuery object being moved in the global namespace. I can create a pull request for this if needed.

bruth commented 12 years ago

Negative. All modules are wrapped: https://github.com/bruth/synapse/blob/master/dist/dev/synapse/hooks/jquery.js#L4-12

Rodeoclash commented 12 years ago

Agreed, my misunderstanding.