How to avoid conflict between jquery and prototype

To avoid the conflict have 2 method

1.Use the noConflict for jquery, assign new variable for $, and Use the new variable wherever you would have used the $ for jQuery

2. If you don’t need to mix Prototype/jQuery you can wrap all of your jQuery code in an anonymous function. and can use where ever.