/documentation/appframework/$.is$.md
Markdown | 44 lines | 29 code | 15 blank | 0 comment | 0 complexity | efe1a8983cefac85a196e2e414e0e59b MD5 | raw file
- #$.is$(param)
- ```
- Checks to see if the parameter is a $afm object
-
- ```
- ##Example
- ```
- var foo=$("#header");
- $.is$(foo);
-
- ```
- ##Parameters
- ```
- element Object
- ```
- ##Returns
- ```
- Boolean
- ```
- ##Detail
- $.is$ checks to see if the instance of an object is of type "$" or "$afm or App Framework. This is usefull for checking for parameter types in functions.
- ```
- var tmp = $("div");
- var bar=null;
- function test(el){
- if($.is$(el)) //if we have an App Framework object, get the first element
- el=el[0];
- };
- alert(test(tmp));//true
- alert(test(bar));//false
- ```