jQuery UI Widgets › Forums › Getting Started › Version of JQuery
Tagged: AMD, asynchronous module definition, getting started, jQuery, jQuery version, jqwidgets, jqxgrid, module loader, systemjs
This topic contains 6 replies, has 4 voices, and was last updated by asitk 8 years, 5 months ago.
-
AuthorVersion of JQuery Posts
-
I am evaluating JQWidgets, trying to get it working in my app.
When I use the latest version of jquery supported by JQWidgets, 2.1.3, my watch window shows
window.jQuery
as undefined. This causes many of my other jQuery plugins to fail (withjQuery is not defined
). When I remove those plugins (to see if JQWidgets works) then I also get an error in JQWidgets abouta.jqx
. (So no plugins seem to like this version.)When I used JQuery 2.2.2,
window.jQuery
is defined as normal. All my plugins work fine, but JQWidgets fails withjqxBaseFramework is not defined
.I have read on other threads that this means the JQWidgets can’t find jQuery. Is this because I have set something up wrong? or is 2.2.2 really just so different that it will not even load?
NOTE: I have checked my network tab, and jquery.js is loaded before any JQWidget files.
So, this is related to me using systemjs as a module loader. JQWidgets is using global variables that it expects to setup in one file, and have available in the next file.
Module loaders expect each file to export values that will be shared, and other modules to import them as needed.
Because JQWidgets is not written that way, it cannot be used with systemjs (as far as I know).
To get past this issue, I took all the widgets that I wanted to use, and put them in one file. Then I imported that one file.
Still don’t see my grid, but I am past this error…
Hello Vaccano,
Please note that, while we have no experience with systemjs, jQWidgets can be integrated with another module loader – RequireJS. You can find more information here: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/requirejs/requirejs_tutorial.htm.
If still do not see your grid, maybe there is another error thrown. If so, could you, please, share what it is?
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello,
I am facing a similar problem with Webpack. I get jqxFramework is not defined when i try to use the ES6 import syntax
my .js file >>
import $ from ‘jquery’;
import ‘jqwidgets-framework/jqwidgets/styles/jqx.base.css’;
//import jqwidgets from ‘jqwidgets-framework/jqwidgets/jqx-all.js’;import * as jqxBaseFramework from ‘jqwidgets-framework/jqwidgets/jqxcore.js’;
import * as jqxribbon from ‘jqwidgets-framework/jqwidgets/jqxribbon.js’;
import * as jqxwindow from ‘jqwidgets-framework/jqwidgets/jqxwindow.js’;
import * as jqxlayout from ‘jqwidgets-framework/jqwidgets/jqxlayout.js’;
import * as jqxdockinglayout from ‘jqwidgets-framework/jqwidgets/jqxdockinglayout.js’;Webpack output:
ReferenceError: jqxBaseFramework is not defined (http://localhost:5601/bundles/infrared.bundle.js?v=8467:78606)Hi asitk,
jqxBaseFramework is defined if jQuery is defined, because jqxBaseFramework = jQuery by default in our code. If jQuery is undefined, you will get errors.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks! I will check this out
-
AuthorPosts
You must be logged in to reply to this topic.