Avoiding conflict between jQuery and Spry frameworks

I spent all day working on a site design and I came across a particularly annoying situation which made me take a break and a deep breath. In the design, I am using  jQuery to perform some JavaScript tasks like rounding off corners of divs, etc and Spry to format menus and to create accordions, etc.

I know that it might be a good idea to do all the tasks using  jQuery, but due to the tight deadline I did not want to have to learn anything new. I remember doing this successfully in another design that I did almost a year ago, so off I went to my project archives.

As it turned out, I found that the best way to do it is the one discussed in this article. Basically, you can override the $ function and replace it with “jQuery” or you can reassign jQuery to a variable as in var $t = jQuery.noConflict(); and then call the variable in the function, such as “$j(document).ready(function(){…”.

Hope you will have better luck than me.