How to use jQuery with browserify? -
I have installed jQuery (v1.11.1) with npm. (I need 1x because I want to use it with glass which does not support 2.x).
Then I try to import the jQuery object with the required object through the browser I am doing it, but it seems that the return thing is not expected, so I can not use it.
While trying to use it, I get the What am I doing wrong? How can I use the browser with jQuery? In the Note that jQuery has its own factory export only if there is no global var jQuery = require ('jquery / dist / jquery') (window);
Unkot Type error: object function is not .
main code> jquery.js , So you can do this:
var jQuery = require ('jquery'); JQuery ('body'). Text ('Hello World');
document property when used with browserfair, then the one which is exported It does not have a factory function, but regular jQuery objects.
Comments
Post a Comment