What is the benefit of wrapping a jquery function in a closure?

后端 未结 3 2098
鱼传尺愫
鱼传尺愫 2021-01-05 03:25

Hi I\'ve been busy trying to take my knowledge of JQuery to the next level, So far I think I\'ve understood everything but as I\'ve ventured onto more advanced tutorials I\'

3条回答
  •  滥情空心
    2021-01-05 04:02

    This maps jQuery to $ for the scope of the closure, preventing conflicts with other libraries which may also claim the $ namespace (e.g. MooTools).

提交回复
热议问题