WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I realise jQuery 2.0 dropped support for some browsers including IE7 and IE8.

I'm only using a bit of jQuery on my WordPress site, but since I need to support IE7/IE8, I was wondering what the best way was to go about including older versions of jQuery? Or should I just choose one version (like 1.9.1), that supports older and more modern browsers, and stick with that?

I'm currently injecting jQuery into my functions.php like so:

if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
    wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js", false, null);

Any help is appreciated. Thanks in advance!

share|improve this question
Use the default jQuery (as you should anyway), and you get the compatibility script for free. – toscho Feb 2 '14 at 23:27
Thanks for this. After reading your comment I've read a few articles about using WP's default jQuery. Completely baffled as to why this barebones theme I'm using decides to include jQuery in this way. – realph Feb 3 '14 at 0:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.