jQuery jQuery.support Property (original) (raw)

Last Updated : 11 Jul, 2023

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

**Syntax:

jQuery.support.propvalue

**Parameters: This property contains a single parameter

**propvalue: which is required. It is used to specify the function to test for. The tests included are:

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

html `

jQuery jQuery.support property
<script src=

"" title="undefined" rel="noopener noreferrer">https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">

GeeksForGeeks

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

`

**Output:

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

html `

jQuery jQuery.support property
<script src=

"" title="undefined" rel="noopener noreferrer">https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">

</script>
<script>
    $(document).ready(function () {
        $.support.cors = false;
        $("h3").html(" Previous Example statement is not"
            + " correct : " + jQuery.support.cors);
    });
</script>

GeeksForGeeks

    <h2>jQuery jQuery.support property</h2>

    <h3 style="color:lightgreen;"></h3>
</center>

`

**Output: