jQuery.isEmptyObject() method
Example
Return the index value of a specified element in an array
$
(
function
(
)
{
function
fun
(
html
)
{
document
.
body
.
innerHTML
+=
"
"
html
;
}
fun
(
$.
isEmptyObject
(
{
}
)
)
;
//
true
fun
(
$.
isEmptyObject
(
{
foo
:
"
bar
"
}
)
)
;
//
false
}
)
Try it »
Definition and Usage
The $.isEmptyObject() function is used to check whether an object is empty (contains no properties).
Syntax
$
.isEmptyObject( object )
| Parameters | Description |
|---|---|
| object | Object type: The object to be checked for emptiness. |
jQuery Miscellaneous Methods