librelist archives

« back to archive

Conflict: Jquery with converse conflict with jquery-ui of my page

Conflict: Jquery with converse conflict with jquery-ui of my page

From:
Mohit Jain
Date:
2014-06-01 @ 19:05
Hi All,

First of all, sorry for any English grammar issue. I hope that my 
explanation can show well the problem.
It is simple:
 When I load jquery in converse.min.js, the jquery-ui in my webpage 
conflicts and it functions are not loaded.

My application is working on Jquery 1.5 and converse is using 1.8. I have 
changes my jquery version on 1.8 but that is not workable 
for me.

I got the following error when i use the jquery UI components and converse.js
TypeError: $.datepicker is undefined
$.datepicker.setDefaults($.datepicker.regional['nl']);

I need to use jquery-ui not only with my webpage, but with converse.js 
too. Is that possible?
So, what should I do to solve this?

Thanks,
Mohit

Re: [conversejs] Conflict: Jquery with converse conflict with jquery-ui of my page

From:
Jc Brand
Date:
2014-06-02 @ 08:51
On Mon, Jun 02, 2014 at 03:05:40AM +0800, Mohit Jain wrote:
>    Hi All,
>    First of all, sorry for any English grammar issue. I hope that my
>    explanation can show well the problem.
>    It is simple:
>     When I load jquery in converse.min.js, the jquery-ui in my webpage
>    conflicts and it functions are not loaded.
>    My application is working on Jquery 1.5 and converse is using 1.8. I have
>    changes my jquery version on 1.8 but that is not workable
>    for me.
>    I got the following error when i use the jquery UI components and
>    converse.js
>    TypeError: $.datepicker is undefined
>    $.datepicker.setDefaults($.datepicker.regional['nl']);
>    I need to use jquery-ui not only with my webpage, but with converse.js
>    too. Is that possible?
>    So, what should I do to solve this?

The solution is described in the docs here:

https://conversejs.org/docs/html/index.html#conflicts-with-other-javascript-libraries