jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window jqxwindow.js assumes $ = jQuery

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxwindow.js assumes $ = jQuery #18229

    tvenable.mie
    Participant

    Hello, I work for a recent corporate licensee, and when we were integrating jQWidgets into our codebase we noticed a problem. Normally the jQWidgets code is very careful not to assume that $ is the jQuery function. However, at the end of jqxwindow.js (in the most recent build, 2.8.0) there is a usage of the dollar sign which is not as careful. We have our own JS library which binds $ to another function, so we do not use it for the jQuery function, and thus the code in jqxwindow.js causes an error when we load it. Here’s the exact line:

    $.extend($.jqx._jqxWindow.prototype, resizeModule);

    Given the way that the other code is written, this appears to be a bug. What do you guys think? Thanks!

     

    jqxwindow.js assumes $ = jQuery #18253

    Peter Stoev
    Keymaster

    Hi tvenable.mie,

    Thanks for writing.

    I will create a work item about your issue and we will consider changing the jqxWindow’s resizeModule implementation in the future. However, that is definitely not a bug.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxwindow.js assumes $ = jQuery #18270

    tvenable.mie
    Participant

    Does that mean then, that jQWidgets does not intend to be compatible with uses of $ other than for the jQuery object? In other words, can we expect jQWidgets to be functional if we define $ globally to be something else? It seems that by saying it’s not a bug, that jQWidgets is guaranteed to work only when $ is the jQuery object, am I reading you right? Thanks for clarifying, just want to make sure I understand you.

    jqxwindow.js assumes $ = jQuery #18272

    Peter Stoev
    Keymaster

    Hi,

    I think that you did not understand my post. All it says is that I will create a work item and that is not a bug in jqxWindow. I suggest you to read: http://api.jquery.com/jQuery.noConflict. The topic describes how to use jQuery with other libraries. From the topic, you will also learn that you can still use $ for your jQuery code and outside the jQuery ready function the $ may have a different meaning.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.