How do I use the latest version of jQuery and get

2019-05-30 06:36发布

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条回答
2楼-- · 2019-05-30 07:14

You can use $ with jQuery without breaking RichFaces by wrapping your jQuery code in this manner:

(function($) {
  /* your jQuery code can use $() here */
})(jQuery);
查看更多
登录 后发表回答