【小(xiǎo)編推薦】appframework手冊-&₩簡介

2014-07-07   | ‍ε  發布者:梁國(guó)芳  &nb♥♥♦πsp;|   查看(kàn):3320次

app開(kāi)發
 

Quickstart

When using App Framework, you c×£®an only use W3C valid s ♦≠electors. To see the full lis¶λ→t, go to W3C . We do not support thβ‌e custom psuedo select₹σ↔ors that jQuery* has created. Below areλ✔ some examples of how Ap♥§p Framework can help ★☆speed up your development.

First, include App Frame∏$λwork into your page.

1
<script src="//cdn.app-framewo±₹∞rk-software.intel.com/↕÷ 2.1/appframework.min.ו≈js" type="text/javascript&qu₹<βot;></script>
App Framework works by adding elements•βλ→ into a "bucket&"λquot;. All elements inside the bu≈↕♣cket have access to the specia←Ωφl App Framework api functio'>¶ns that help speed up y☆ ∏our development.

To use App Framework, you first call✘<•‍ the $() function with a parameter. The→&$₹ parameter can be one of th"→∑₩e following.
  1. String - this could be an eleme↓σnt id "#id",✘™ classname ".foo", a '§<combination "#id .foo&quΩ∏→ot;, or an HTML string to create ≈☆  an object "<div id='foo'>'α;</div>"
  2. Element - This will c♥≥€reate a new App Fram ♣ework object and add the element to‌¶₩' the bucket.
  3. Array/Object - this will create a new☆> App Framework object and add the items&☆→ to the bucket.
  4. Function - this will ₽♦execute a function wh ✘en DOMContentLoaded has trigg®→ered, or immediatly after the case&↔→
You can also pass an addtional parame≠'®Ωter "Context" that alloλ§↓‍ws you to search/filter within t>★↕hat.

Below are some basic s♥α♣®amples of finding element"× ∑s.

1
2
3
4
5
6
7
$("#foo"); //find the element wΩ≥ith id="foo";
 
$("div"); //Find all the divs ✘✘↑on the page;
 
$(".foo"); //Find all elements that have the clβ assname ="foo";
 
$(