jQuery – how to get version info

to get jQuery version info the variable jQuery.fn.jquery (or $.fn.jquery if $ is being used for jQuery object) can be used. Some examples.

jQuery version in code

<pre id="msg"></pre>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
  $("#msg").text("jQuery version: " + $.fn.jquery);
</script>
refresh

jQuery version in Chrome console

To quickly get jQuery version on a site, Chrome console can be used. Just type the following:

jQuery.fn.jquery
// or $.fn.jquery

The outcome will be something like this:
chrome-console-jquery-version

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments