问题
RichFaces 3.3.3 comes baked in with jQuery 1.3.2 and prototype and scriptaculous as well.
How can I try and use the latest version of jQuery? Can I use the Google CDN one?
Also the $()
object is defaulted to prorotype and to use jQuery I have to do jQuery()
is there a way to get back the $ for jQuery without breaking RichFaces?
UPDATE: You can use multiple versions of jQuery side by side. For now, I've gone ahead and used the version that comes baked with RichFaces.
回答1:
You can use $ with jQuery without breaking RichFaces by wrapping your jQuery code in this manner:
(function($) {
/* your jQuery code can use $() here */
})(jQuery);
来源:https://stackoverflow.com/questions/3881953/how-do-i-use-the-latest-version-of-jquery-and-get-back-the-for-jquery-in-ric