Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (22 sloc) 1.212 kb
<?xml version="1.0"?>
<entry type="method" name="jQuery.isEmptyObject" return="Boolean">
<title>jQuery.isEmptyObject()</title>
<signature>
<added>1.4</added>
<argument name="object" type="Object">
<desc>The object that will be checked to see if it's empty.</desc>
</argument>
</signature>
<desc>Check to see if an object is empty (contains no enumerable properties).</desc>
<longdesc>
<p>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). The argument should always be a plain JavaScript <code>Object</code> as other types of object (DOM elements, primitive strings/numbers, host objects) may not give consistent results across browsers. To determine if an object is a plain JavaScript object, use <a href="http://api.jquery.com/jQuery.isPlainObject"><code>$.isPlainObject()</code></a></p>
</longdesc>
<example>
<desc>Check an object to see if it's empty.</desc>
<code><![CDATA[jQuery.isEmptyObject({}) // true
jQuery.isEmptyObject({ foo: "bar" }) // false
]]></code>
</example>
<category slug="utilities"/>
<category slug="version/1.4"/>
</entry>
Jump to Line
Something went wrong with that request. Please try again.