[Translation] Quick Start of App Framework 2.1 (1) (to be continued), appquickstart

Source: Internet
Author: User

[Translation] Quick Start of App Framework 2.1 (1) (to be continued), appquickstart

Recently, a mobile App project selects the Hybrid Framework Cordova and App Framework development.

It should have been written from the configuration step by step. However, due to the busy working hours, this time cannot be left blank. It can only be written based on your mood and interests, the previous part will be added later.

The App Framework was originally called jqMobi. Note that you should not confuse it with jQuery Mobile. They are two different frameworks. At first, I was confused for 0.01 seconds.

Here, I will first translate the Quick Start part. First, I will use it for my work, and second, I want to practice English by the way. The most important thing is that my memory is falling too much during this period, I have to repeat it again soon, and write it down to make it easier.

Here: http://app-framework-software.intel.com/documentation.php

Intro-> Quickstart (introduction-> Quick Start)

When using the App Framework, you can only use the valid selector specified by W3C. To view the list of all valid selectors, click W3C. App Framework does not support custom pseudo classes implemented by jQuery itself (Press: pseudo classes should be pseudo-do, psuedo is officially written, and foreigners also have typos) selector (Press: see here ). The following examples help developers accelerate development.

First, insert the App Framework into the page.

<script src="//cdn.app-framework-software.intel.com/2.1/appframework.min.js" type="text/javascript"></script>

  App FrameworkRunning is to add an element to a "container" (bucket ). All elements in the container can use the App Framework api functions, which can help accelerate development.

To use the App Framework, you must first learn to call the $ () function with parameters. The parameters can be one of the following.

  • String-it can be the id "# id", Class "of an element ". foo ", combined with" # id. foo, or an HTML string "<div id = 'foo'> </div>"
  • Element-this creates a new App Framework object and adds this Element to the container.
  • Array/Object this creates a new App Framework Object and Adds all the items of those arrays to the container.
  • Function-this will execute this function when the DOMContentLoaded event is triggered, or immediately after the instance is generated.

You can also use an extra parameter (additional is mistakenly converted into addtional by the official pen, so that it is also visible to people all over the world, so you cannot take it into consideration, allows you to search/filter it within a "context.

  

$ ("# Foo"); // locate the element id = "foo"; $ ("div"); // locate all the divs on the page; $ (". foo "); // locate all elements of classname =" foo "; $ (" # foo span "); // locate all spans of id =" foo"

Next, we will find all the lists (<li>) and add the foo class.

  

$("li").addClass("foo");

  

To be continued...

 




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.