[Proto-Scripty] Re: Problem with jquery+prototype

2012-02-25 Thread T.J. Crowder
Hi,

On Feb 23, 9:42 pm, Syn vjuliu...@gmail.com wrote:
 Hey,

 I'm using a tool which uses prototype. I'm also using my own little
 jquery which looks like this:
 $(document).ready(function(){
         $('.flip').click(function(){
         $('#panel').slideToggle('slow');
         });
         });

 The problem is if I include prototype.js then my (above) script does
 not work. I'm really in hurry with the project can't dive into
 prototype's nitty-gritty.

 Could somebody let me know how to solve this,

 Thanks,
 Syn

This comes up all the time, just do a search for it and you'll find
details.

The short version is: Both jQuery and Prototype try to use the `$`
symbol. jQuery is kind enough to provide a function to relinguish
control of it, called `noConflict`. So just add this after your script
tag that includes jQuery:

scriptjQuery.noConflict();/script

Then `$` belongs to Prototype, and `jQuery` is how you access jQuery.
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Problem with jquery+prototype

2012-02-24 Thread T.J. Crowder
Hi,

On Feb 23, 9:42 pm, Syn vjuliu...@gmail.com wrote:
 Hey,

 I'm using a tool which uses prototype. I'm also using my own little
 jquery which looks like this:
 $(document).ready(function(){
         $('.flip').click(function(){
         $('#panel').slideToggle('slow');
         });
         });

 The problem is if I include prototype.js then my (above) script does
 not work. I'm really in hurry with the project can't dive into
 prototype's nitty-gritty.

 Could somebody let me know how to solve this,

 Thanks,
 Syn

The _slightest effort_ on your part would find the solution:
http://api.jquery.com/jQuery.noconflict

-- T.J.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.