How to determine and print jQuery version?

后端 未结 7 1368
北恋
北恋 2021-01-31 14:06

Is there a jQuery function that returns the version of jQuery that is currently loaded?

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 14:41

    I'm not sure how many versions of jQuery this exists in, but a jQuery object has a jquery property that stores the version.

    alert( $().jquery );
    

    Will alert 1.4.2 if you're using that version.

提交回复
热议问题