Sunday, December 27, 2009

Re: Problem Prototype / jQuery

Ask on JavaScript forums. It is not Cake-related problem.

On Dec 26, 12:58 pm, thomaus <tho...@saimiris.com> wrote:
> Hi,
>
> I tried it this way:
>
>         <?php
>         echo $javascript->link('/js/scriptaculous-js-1.8.3/lib/prototype');
>        echo $javascript->link('/js/scriptaculous-js-1.8.3/src/
> scriptaculous');
>
>         // jQuery
>         echo $javascript->link('/js/jquery-1.3.2.min.js');
>         ?>
>
>         <script>
>      jQuery.noConflict();
>
>      // Put all your code in your document ready area
>      jQuery(document).ready(function($){
>        // Do jQuery stuff using $
>        $("div").hide();
>      });
>
>      // Use Prototype with $(...), etc.
>      $('someid').hide();
>    </script>
>
>         <?php
>         // jQuery configuration
>         echo $javascript->link('/js/simpla.jquery.configuration.js');
>         // Facebox jQuery Plugin
>         echo $javascript->link('/js/facebox.js');
>         // jQuery WYSIWYG Plugin
>         echo $javascript->link('/js/jquery.wysiwyg.js');
>         ?>
>
>         <!-- Internet Explorer .png-fix -->
>         <!--[if IE 6]>
>                 <?php echo $javascript->link('/js/DD_belatedPNG_0.0.7a.js'); ?>
>                 <script type="text/javascript">
>                         DD_belatedPNG.fix('.png_bg, img, li');
>                 </script>
>         <![endif]-->
>
> I also tried to put it just after the simpla.jquery.configuration and
> still, it doesn't work.
>
> Thanks,
>
> On Dec 25, 12:58 pm, "Dr. Loboto" <drlob...@gmail.com> wrote:
>
>
>
> > jQuery.noConflict() must be called immediately after initial jQuery
> > include.
>
> > On Dec 24, 11:08 pm,thomaus<tho...@saimiris.com> wrote:
>
> > > Hi there,
>
> > > I have an issue using both Prototype and jQuery in my app.
>
> > > Here is my JS includes in my head folder:
>
> > >         <?php
> > >         echo $javascript->link('/js/scriptaculous-js-1.8.3/lib/prototype');
> > >         echo $javascript->link('/js/scriptaculous-js-1.8.3/src/
> > > scriptaculous');
>
> > >         // jQuery
> > >         echo $javascript->link('/js/jquery-1.3.2.min.js');
>
> > >         // jQuery configuration
> > >         echo $javascript->link('/js/simpla.jquery.configuration.js');
> > >         // Facebox jQuery Plugin
> > >         echo $javascript->link('/js/facebox.js');
> > >         // jQuery WYSIWYG Plugin
> > >         echo $javascript->link('/js/jquery.wysiwyg.js');
> > >         ?>
>
> > >         <!-- Internet Explorer .png-fix -->
> > >         <!--[if IE 6]>
> > >                 <?php echo $javascript->link('/js/DD_belatedPNG_0.0.7a.js'); ?>
> > >                 <script type="text/javascript">
> > >                         DD_belatedPNG.fix('.png_bg, img, li');
> > >                 </script>
> > >         <![endif]-->
>
> > > <script>
> > >      jQuery.noConflict();
>
> > >      // Put all your code in your document ready area
> > >      jQuery(document).ready(function($){
> > >        // Do jQuery stuff using $
> > >        $("div").hide();
> > >        alert('jquery');
> > >      });
>
> > >      // Use Prototype with $(...), etc.
> > >      $('someid').hide();
> > >    </script>
>
> > > and no luck : when I comment jQuery, my Prototype paginator works, and
> > > when I comment Prototype, my jQuery tabs don't work. Can someone help
> > > me????
>
> > > I also tried the other solution commented here :http://docs.jquery.com/Using_jQuery_with_Other_Librariesbyputting
> > > jQuery include before the Prototype include and... no luck.
>
> > > Just a thought : why on Earth Cake Ajax helper is based on the old
> > > fashioned Prototype and not on the great jQuery???
>
> > > Thanks.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: