RequireJS - jQuery plugins with multiple jQuery versions

前端 未结 1 1390
迷失自我
迷失自我 2021-01-05 12:48

I am trying to wrap some legacy js code in modules so that they can be loaded with RequireJS.

I have three jQuery plugins, let\'s call them a,b and c.

相关标签:
1条回答
  • 2021-01-05 13:15

    If you are really using jquery 1.4 this version doesn't support Requirejs, you should define de shim configuration, however you will have a conflict as jquery defines $ object globally, so it will overwrite any existing global $ variable. I think you can avoid this problem using jQuery.noConflict.

    0 讨论(0)
提交回复
热议问题