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:
- 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.
html
<!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 >
$(document).ready(function () {
$("h3").html("GeeksForGeeks is best for"
+ " Computer Knowledge : "
+ jQuery.support.ajax);
});
</ script >
</ center >
</ body >
</ html >
|
Output:

Example 2: This example illustrates jQuery.support property with cors parameter value.
html
<!DOCTYPE html>
< html >
< head >
< title >
jQuery jQuery.support property
</ title >
< script src =
</ script >
< script >
$(document).ready(function () {
$.support.cors = false;
$("h3").html(" Previous Example statement is not"
+ " correct : " + jQuery.support.cors);
});
</ script >
</ head >
< body >
< center >
< h1 style = "color:green;" >
GeeksForGeeks
</ h1 >
< h2 >jQuery jQuery.support property</ h2 >
< h3 style = "color:lightgreen;" ></ h3 >
</ center >
</ body >
</ html >
|
Output:
