Quickstart
When using App Framework, you can only use W3C valid selectors. To see the full list, go to W3C . We do not support the custom psuedo selectors that jQuery* has created. Below are some examples of how App Framework can help speed up your development.
First, include App Framework into your page.
1
|
<script src= "//cdn.app-framework-software.intel.com/2.1/appframework.min.js" type= "text/javascript" ></script>
|
App Framework works by adding elements into a "bucket". All elements inside the bucket have access to the special App Framework api functions that help speed up your development.
To use App Framework, you first call the $() function with a parameter. The parameter can be one of the following.
- String - this could be an element id "#id", classname ".foo", a combination "#id .foo", or an HTML string to create an object "<div id='foo'></div>"
- Element - This will create a new App Framework object and add the element to the bucket.
- Array/Object - this will create a new App Framework object and add the items to the bucket.
- Function - this will execute a function when DOMContentLoaded has triggered, or immediatly after the case
You can also pass an addtional parameter "Context" that allows you to search/filter within that.
Below are some basic samples of finding elements.
1
2
3
4
5
6
7
|
$( "#foo" );
$( "div" );
$( ".foo" );
|