Frequently Asked Questions About jQuery

by jQueryScript,

Frequently asked questions about jQuery and jQuery related web technologies.

What is jQuery?

jQuery is a JavaScript library (NOT A FRAMEWORK) created for faster, easier and cross-browser web design.

jQuery is a gracefully, feature-rich JavaScript library that simplifies web animations, DOM manipulation, event handling, etc.

What's The jQuery Latest Version?

The latest version of jQuery is jQuery 3.4.1.

Who Are Using jQuery?

A study shows that jQuery is used by 74.1% of all the websites (July 2019).

Is jQuery Dead/Outdated?

I think jQuery will never die as long as the DOM exists.

Due to the birth and development of various JavaScript frameworks (React, Angular, Vue) in recent years, jQuery has become less popular than in previous years.

Our statistics show that the downloads of jQuery plugins have been stable in recent years, with no significant decline (Aug 1, 2019).

jquery script analytics

Where To put jQuery library and jQuery script?

<!-- jQuery 3.x.x -->
<script src="//code.jquery.com/jquery-3.4.1.min.js"></script>
<!-- Slim build -->
<script src="//code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<!-- jQuery 2.2.x -->
<script src="//code.jquery.com/jquery-2.2.4.min.js"></script>
<!-- jQuery 1.x -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<!-- Latest jQuery library -->
<script src="//code.jquery.com/jquery-latest.min.js"></script>

I highly recommended you to put jQuery library and jQuery script at the end of the document (but before the closing body tag) for better page performance.

If you're using a jQuery plugin, don't forget to put the jQuery plugin after jQuery and call the function on document ready.

Which jQuery Version Should I Use?

Are your customers still using legacy browsers (Internet Explorer 7/8/9)?

  • Yes --> jQuer 1.x
  • No --> jQuery 3.x, 4.x

Do you use animations and AJAX technology in your project?

  • Yes --> Regular version
  • No --> Slim build

What Is jQuery Slim Build?

The slim build of jQuery is introduced in the jQuery 3.0 final release that is created to reduce the jQuery size and improve the page load speed.

Slim build is about 6k gzipped bytes smaller than the regular version – 23.6k vs 30k. It excludes ajax, effects, and currently deprecated code. 

How To Use jQuery Plugins In Wordpress?

jQuery library is now integrated into the Wordpress core by default.

To use a jQuery plugin in your Wordpress plugin, just download and upload the script to the Wordpress, and then call the plugin using Compatible mode to avoiding conflicts (replace $ with jQuery).

// regular
$(selector).plugin({
  // options, callbacks, etc
})

// Compatibility Mode
jQuery(selector).plugin({
  // options, callbacks, etc
})

Are jQuery Selectors Case Sensitive?

Yes. JavaScript is a case-sensitive language.

Can jQuery Be Used with Javascript?

Of course. jQuery itself is a JavaScript library. It works perfectly with any JavaScript project.

Can jQuery Be Used with React/Angular/Vue?

Yes but not recommended.