I have written a site in Prototype but want to switch to jQuery. Any ideas on how best make the switch?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Personally, I like to take things in steps, so I would start by using both, like this:
That way you don’t have to convert all your old code at once, but can start using jquery on new stuff, and migrate your old Prototype code when ever it’s convenient. I don’t know the size of your project, so I can’t say whether or not this applies to you, but Spolsky had a great article about ‘The big rewrite’ and why it’s such a bad idea in Things you should never do, Part 1. It’s well worth a read!
For more on using jquery with Prototype, see Using jQuery with other libraries in the jquery docs.