Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery.isEmptyObject() method

jQuery.isEmptyObject() method

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods

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 MethodsjQuery Miscellaneous Methods