jQuery Utility Functions: Type Testing Cheat Sheet by dan_schmidt
Comments
|
Add a Comment
|
PDF Download
|
Find:
Use Cases
| Determine the type of an object |
| Allow for optional parameters & validation |
| |
Functions
| $.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 |
| |
type() Function Return Values
|
boolean
|
|
number |
|
string |
|
function |
|
array |
|
date |
|
regexp |
|
object |
|
undefined |
|
null |
|
Favourited by 7 Members:
Comments
No comments yet. Add yours below!
Add a Comment
You are posting a reply. Cancel Reply.
Contents
Overview of jQuery's type testing utility functions.
Cheatographer
Cheat Sheet Stats
Tags
Related (shares tags with):
Thumbnail