Can I use jQuery version 3.x for custom widgets?

0
I have followed the Hello World Custom Widget tutorial and once built, noticed that the jQuery version used is 1.11.2. jQuery is on version 3, but when trying to migrate/replace it like this: define([ ... "GridGenerator/lib/jquery-1.11.2.min", "GridGenerator/lib/jquery-migrate-3.0.0", "GridGenerator/lib/jquery-3.1.0", "dojo/text!GridGenerator/widget/template/GridGenerator.html" ], function (..., _jQuery, jQueryMigrate, jQueryNew, widgetTemplate) ... It gives me the following errors: Error: multipleDefine Stack trace: _f@http://localhost:8080/mxclientsystem/mxui/mxui.js?636092863345974371:21:436 ... _50c@http://localhost:8080/mxclientsystem/mxui/mxui.js?636092863345974371:21:137909 TypeError: _jQuery is undefined Stack trace: @widgets/GridGenerator/widget/GridGenerator.js:44:9 ... _50c@http://localhost:8080/mxclientsystem/mxui/mxui.js?636092863345974371:21:137909 Is this due to Mendix not supporting jQuery and only version 1.11.3? Should I thus abandon my attempt to use the latest jQuery version?
asked
1 answers
0

I think the included jQuery library is just an example, although there might be issues with DOJO (MX client side library base) and jQuery 3+ I don't see why you would need to include both the 1.11.2.min and the migrate + 3.1.0 file in your define statement. You should be fine by just including 3.1.0, do make sure you prevent any jQuery conflicts as other widgets might also use jQuery.

answered