Easy Tutorial
❮ Misc Parsehtml Ajax Serializearray ❯

jQuery.isEmptyObject() Method

jQuery Miscellaneous Methods

Example

Returns the index value of the specified element in the array

$(function () { 
    function fun( html ){ 
        document.body.innerHTML += "<br>" + html; 
    } 
    fun($.isEmptyObject({})); // true 
    fun($.isEmptyObject({ foo: "bar" })); // false 
})

Definition and Usage

The $.isEmptyObject() function is used to check if an object is empty (contains no properties).


Syntax

Parameter Description
object object type The object to be checked for emptiness.

jQuery Miscellaneous Methods

❮ Misc Parsehtml Ajax Serializearray ❯