0

I have a WordPress website and I have installed one plugin and the plugin has some problems in IE6 browser.

So, I want to disable that jQuery plugin when the page is viewed with the IE6 browser.

So now I need a jQuery statement to disable ALL other statements that are loading from other JS files.

14
  • 1
    Please check THIS out Commented Apr 18, 2014 at 16:06
  • 4
    IE6 , come-on man ... Microsoft Ends Support for Windows XP Commented Apr 18, 2014 at 16:06
  • 1
    You'll have to be a lot more clear on what you really want to do. Do you want to disable the entire page in IE6? One might also ask why, in 2014, you are even worrying about IE6? You could just hide the whole body content on IE6 and inject a one line message that says that IE6 is not supported. Commented Apr 18, 2014 at 16:06
  • 1
    @jfriend00 You are right! but here , MANY users use this shi..t browser :| Commented Apr 18, 2014 at 16:08
  • 1
    please provide some code , including html part & jQuery part Commented Apr 18, 2014 at 16:11

2 Answers 2

2

use Downlevel-revealed conditional comments :

<!--[if lte IE 6]><![if gte IE 7]><![endif]-->

<!-- keep your script in between these two comments, 
it will work in all browser except ie -->

<!--[if lte IE 6]><![endif]><![endif]-->

Explained here : Hiding some HTML from IE6?

Sign up to request clarification or add additional context in comments.

Comments

1

I'm not entirely sure why IE6 is even on your agenda, but to each their own.

If it were me I would write something like this.

<!doctype html>
    <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->....
    .....


(function ($) {
    "use strict";

    // Detect IE 6
    var greatGreatGranddadsBrowser;
    if ($('html').is('.ie6')) {
        greatGreatGranddadsBrowser = true;
    }

    if (greatGreatGranddadsBrowser) {
        // Remove the elements that you don't want loaded
        // Tell the users to seriously consider coming into the real world
    } else {
        // Do whatever else you need to do 
    }

}(jQuery));

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.