Two jQuery versions on the same page

后端 未结 3 1912
故里飘歌
故里飘歌 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 11:48

    Here is a way to detect is JQuery is already present: jQuery in widget

    Work out the oldest version of JQuery your code will work with.. And refuse to work if the version present is too old. Only a few people will miss out, most sites using JQuery are pretty up to date..

提交回复
热议问题