How to encapsulate jQuery?

后端 未结 4 578
一整个雨季
一整个雨季 2021-01-14 03:46

Particularly I want to define local jQuery (var jQuery) where
jQuery should be stored (and also local $).

The problem is that jQuery operates directly with windo

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 03:59

    You can remove it with .noConflict:

    var localjQuery = jQuery.noConflict(true);
    

    But it will have been in global scope before that call...

提交回复
热议问题