jQuery | jQuery.support Property

The jQuery.support property in jQuery contains a collection of properties which are used to represents the different browser features or bugs.

Syntax:

jQuery.support.propvalue

Parameters: This property contains single parameter propvalue which is required. It is used to specify the function to test for. The tests included are:



  • ajax
  • boxModel
  • changeBubbles
  • checkClone
  • checkOn
  • cors
  • cssFloat
  • hrefNormalized
  • htmlSerialize
  • leadingWhitespace
  • noCloneChecked
  • noCloneEvent
  • opacity
  • optDisabled
  • optSelected
  • scriptEval()
  • style
  • submitBubbles
  • tbody

Example 1: This example uses jQuery.support property to text the browser to create an XMLHttpRequest object.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head
    <title>
        jQuery jQuery.support property
    </title>
      
    <script src=
    </script>
</head
  
<body>
    <center>  
        <h1 style = "color:green;" >  
            GeeksForGeeks
        </h1>  
          
        <h2> jQuery jQuery.support property</h2>
          
        <h3 style="color:lightgreen;" ></h3>
          
        <!-- Script to use jQuery.support property -->
        <script>
            $(document).ready(function() {
                $("h3").html("GeeksForGeeks is best for"
                        + " Computer Knowledge : " 
                        + jQuery.support.ajax);
            });
        </script>
    </center>
</body>
  
</html>  

chevron_right


Output:

Example 2: This example illustrates jQuery.support property with cors parameter value.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head
    <title>
        jQuery jQuery.support property
    </title>
      
    <script src=
    </script>
</head
  
<body>
    <center>  
        <h1 style = "color:green;" >  
            GeeksForGeeks
        </h1>  
          
        <h2>jQuery jQuery.support property</h2>
          
        <h3 style="color:lightgreen;" ></h3>
          
        <!-- Script to use jQuery.support property -->
        <script src=
        </script>
          
        <script>
            $(document).ready(function() {
                $.support.cors = false;
                $("h3").html(" Previous Example statement is not"
                        + " correct : " + jQuery.support.cors);
            });
        </script>
    </center>
</body>
  
</html>  

chevron_right


Output:



My Personal Notes arrow_drop_up

Small things always make you to think big

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.