This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Problem with jQuery datepicker and Lightbox2 when associated

Forum to discuss ExtJS and other JS plugins

Problem with jQuery datepicker and Lightbox2 when associated

by missJ » Fri May 06, 2011 6:20 pm

Hi everyone,

I've got a problem with jQuery Datepicker and Lightbox2. They can't work together I don't know why...

I include the required scripts in view.yml:
Code: Select all
javascripts:    [jquery-1.5.1.min.js, jquery.ui.datepicker-fr.js, jquery-ui-1.8.12.custom.min.js, prototype.js, scriptaculous.js?load=effects,builder]

But only the Lightbox works in this configuration.

If I switch the order like this:
Code: Select all
javascripts:    [prototype.js, scriptaculous.js?load=effects,builder, jquery-1.5.1.min.js, jquery.ui.datepicker-fr.js, jquery-ui-1.8.12.custom.min.js]

Now only the Datepicker works...

I don't know where my problem comes from.

Any idea?

It would be very helpful, I am trying and trying again to avoid this bug but I don't succeed...


Thanks a lot,
MissJ
missJ
Junior Member
 
Posts: 8
Joined: Tue Apr 12, 2011 4:23 pm

Re: Problem with jQuery datepicker and Lightbox2 when associ

by claudia_k » Sat May 07, 2011 6:32 pm

Hi there

Did you put jQuery into noConflict mode? Using jQuery and prototype together can cause problems because both use the $-sign, but for different things and the noConflict mode should help with that.

Good luck

Claudia
claudia_k
Faithful Member
 
Posts: 265
Joined: Mon Jun 21, 2010 8:12 pm
Location: Luxembourg

Re: Problem with jQuery datepicker and Lightbox2 when associ

by missJ » Sat May 07, 2011 8:23 pm

Thanks a lot!

Just in case for information:

I add:
Code: Select all
<script type="text/javascript">
jQuery.noConflict();
  jQuery(document).ready(function() {
//my code for the Datepicker}


and in the view.yml, I include in this order:
Code: Select all
 javascripts:    [jquery-1.5.1.min.js, jquery.ui.datepicker-fr.js, jquery-ui-1.8.12.custom.min.js, prototype.js, scriptaculous.js?load=effects,builder]


And it works perfectly, even if it doesn't work when I switch the order, don't know exactly why...

Thanks again Claudia!

MissJ
missJ
Junior Member
 
Posts: 8
Joined: Tue Apr 12, 2011 4:23 pm