tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

jQuery.isEmptyObject()

jQuery.isEmptyObject( object )

Returns: Boolean
Description: Check to see if an object is empty (contains no properties).

Arguments

jQuery.isEmptyObject( object )

version added: 1.4
object
The object that will be checked to see if it's empty.
As of jQuery 1.4 this method checks both properties on the object itself and properties inherited from prototypes (in that it doesn't use hasOwnProperty).

Example

Check an object to see if it's empty.
jQuery.isEmptyObject({}) // true
jQuery.isEmptyObject({ foo: "bar" }) // false
Was this information helpful?
   

Comments