AuthorConfused with jQuery use Posts
I’m totally confused with good practice with the combination Jquery / JQWidgets.
on my website I followed your documentation chapter “Jquery basics”, and included jquery 1.11
Obviously this library is obsolete, and I get security warnings on Lighthouse Console in my Chrome Browser.
I see on your release history that you accept jquery 3.5.1 since 2020
(jQWidgets v9.1.6 Release, May-18-2020
– Fixed an issue in jqxComboBox and jqxPanel regarding jQuery 3.5.1.)
So I decided tu upgrade my jquery version, and to control deprecated functionnalities with the jquery migrate plugin
The problem is that lots of jqwidgets functionnalities seams to be deprecated with jquery 3.X, I have dozens of alerts on each page
(jqxdata.js : jQuery.isFunction() is deprecated
jqxtextarea.js : jQuery.trim is deprecated; use String.prototype.trim
jqxgrid.js : jQuery.isArray is deprecated; use Array.isArray
jqxcore.js : jQuery.isWindow() is deprecate
And today I’m more confused, discovering the answer of Peter Stoev in this topic:
“You may remove jQuery. It is not necessary.”
Could you please update your Documentation, especially the Introduction chapter and Jquery Basics Chapter, to clearly explain what is the good practice with the use of Jquery / Jqwidgets.
Thank you for the detailed feedback regarding our documentation.
What Peter Stoev meant was that importing jQuery is not necessary since all required functions are contained inside of the .js files of a widget component.
It is fine to import jQuery if you plan to use it anywhere else in your project. But there is no point in importing it just for jqwidets, since our components are standalone. jQuery was necessary for our products before, but for more recent versions it is not the case anymore.
The warnings you are seeing are connected to some of the functions that are contained inside of the .js files
I hope this makes it more clear!
If you have any other questions, please do not hesitate to contact us again
You must be logged in to reply to this topic.