jQuery UI Widgets Forums Getting Started Version of JQuery

This topic contains 6 replies, has 4 voices, and was last updated by  asitk 8 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Version of JQuery #83116

    Vaccano
    Participant

    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 (with jQuery is not defined). When I remove those plugins (to see if JQWidgets works) then I also get an error in JQWidgets about a.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 with jqxBaseFramework 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.

    Version of JQuery #83117

    Vaccano
    Participant

    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).

    Version of JQuery #83118

    Vaccano
    Participant

    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…

    Version of JQuery #83167

    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Version of JQuery #84412

    asitk
    Participant

    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)

    Version of JQuery #84415

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Version of JQuery #84443

    asitk
    Participant

    Thanks! I will check this out

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.