Closed ViktorHofer closed 8 years ago
http://www.jsviews.com/#node/browserify@jsviews
If jQuery is loaded globally then require('jsviews')
will load JsViews (as a jQuery plugin on the global jQuery') and return the jQuery object $
. So then when you pass your local $
as parameter you are in fact doing $(Local$);
If you want require('jsviews')($);
to work you have to first write global.jQuery = undefined;
For example you could do:
var global$ = global.jQuery;
global.jQuery = undefined;
require('jsviews')(local$);
global.jQuery = global$
That's what I do in this unit test: https://github.com/BorisMoore/jsviews/blob/master/test/browserify/8-unit-tests.js#L15
Hey Boris,
thanks that helped me a lot!
Hey Boris,
I noticed that when jQuery is globally available but I wanna use my local jQuery instance with jsviews like this:
than this error occures:
Thanks for your support and great framework!!