Search code examples
javascriptjqueryhtmlinternet-explorer-6

Disable all JavaScript and jQuery in one HTML page


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.


Solution

  • 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?