HTML5 mobile development path (1) -- Side Menu implementation in jqMobi (similar to Renren)

Source: Internet
Author: User

I remember that when I was using a Native App, the sliding effect on the Side of Renren's web page was very hot. Many apps were developed based on this effect. In jqMobi, similar effects were also called Side Menu. next, we will implement this effect step by step.

First, create an html file and introduce the jqMobi framework as follows:

Next, add a panel as follows:

 

 

Next, we will add a <nav> label under the same level of panel


Next, we will add a panel and add header and footer.

 

 

At this time, we will find that the two panels correspond to the same side menu. Next we will specify a side menu for each panel.



We will find that the side menu belongs to the panel. You can specify a side menu for each panel, or share a side menu.

The biggest problem now is how to make the above side menu slide between the left and right. The following js can be introduced to achieve



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.