Two jQuery versions on the same page

后端 未结 3 1906
故里飘歌
故里飘歌 2020-12-01 11:17

Is it possible to have 2 different jQuery versions in the same document, and have them to not collide with each other?

For example if I create a bookmarklet and want

3条回答
  •  盖世英雄少女心
    2020-12-01 12:13

    Why not just have different versions of your javascript, for different versions of jquery, so, look at what version is on the page and get the appropriate code that will work on that version of jquery.

    This would be safer, as anything else may be very fragile, as it sounds like you don't have control over the version of jquery that will be on the page.

提交回复
热议问题