Pod::Cats
snapsvg
2012-07-27
Quick jQuery empty-object test
Arrays have
.length
but objects don't.
But since you're already using jQuery you can simply use
param()
to get a truthy value for the object:
if ($.param(obj)) { // obj has stuff }
Al out.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment