BRIEF ISSUE DESCRIPTION: I have multiple instances of the jQuery and jQuery UI libraries running on the same page. I first included the libraries in the <head> of my document. Next, I included the libraries into two separate widgets (ex: My Widget One and My Widget Two). Each included library received a unique name-space.
I then placed within the My Widget One html block an input field. This field, when clicked, will launch the jQuery datepicker. However, continued interaction with the datepicker (i.e., clicking any buttons) results in a jquery ui error which states, "inst is undefined". This error only occurs when multiple jQuery UI libraries are being loaded.
I realize that including multiple instances of the jQuery and jQuery UI libraries as I have presented is not efficient and does not fall in-line with best practices. However, I am currently involved in portlet development, which can often result in a DOM littered with repetitive script includes. I am curious if anyone can explain to me why I am getting the aforementioned error?
ATTACHED EXAMPLE AND SCREEN SHOT: I have attached the library-examination.zip file that illustrates my current error. To preview, extract the library-examination.zip file and open the index.html file in a web browser. When the page loads, click the input field listed under the My Widget One title to launch the jQuery ui datepicker. To see the error, simply interact with the datepicker. I have also attached a screen shot of the error (see: jqueryui-error.png).
Any help or feedback would be greatly appreciated. Thank you.
The datepicker uses inline calls to process date selection. There is a fix in 1.7.2 to protect against $-conflicts, but this doesn't work with multiple jQuery versions. A further fix in 1.8 should correct the problem. Can you try again with the last UI version?
Taking advice from kbwood.au, I went ahead and replaced jquery-ui-1.7.2.min.js with jquery-ui-1.8rc1.min.js. This indeed fixed the issue of running multiple instances of jQuery UI.
Does the community have a patch for the jquery-ui-1.7.2 version? If not, can anyone point out the code which fixed the issue? This would be extremely useful so we could introduce the patch into future versions of our software. Is there a tentative stable release date for jquery-ui-1.8?