Overview of jQuery's type testing utility functions.
|
Determine the type of an object
|
|
Allow for optional parameters & validation
|
|
$.isArray(array) => returns true if array
|
|
$.isFunction(function) => return true if function
|
|
$.isEmptyObject(object) => return true is simple, empty object
|
|
$.isPlainObject(object) => return true if object was created with {} or 'new' keyword
|
|
$.isXmlDoc(doc) => return true if xml document or node within xml document*
|
|
$.isNumeric(number) => return true if number
|
|
$.isWindow(window) return true if window or frame
|
|
$.type(object) => returns type of object as string
|
|
boolean
|
|
number
|
|
string
|
|
function
|
|
array
|
|
date
|
|
regexp
|
|
object
|
|
undefined
|
|
null
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.