How to determine and print jQuery version?

后端 未结 7 1369
北恋
北恋 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:48

    You can use this:

    $.fn.jquery
    //or if you're using .noConflict():
    jQuery.fn.jquery
    

    It's updated automatically when jQuery is built, defined here: http://github.com/jquery/jquery/blob/master/src/core.js#L174

    Make sure to use $.fn.property for properties that don't depend on an object, no reason to create an unneeded jquery object with $().property unless you intend to use it :)

    0 讨论(0)
提交回复
热议问题