Mobile Website Development Summary 2

Source: Internet
Author: User

This period of time has been doing mobile site, by the way to write a summary of it, casually write, think of what to write, all if fortunate to be seen by you, you can ignore ha ....

1.

1 $ (document). Bind ("click",function2         var target =3          If(Target.closest (". Pop"). Length = =04              $ (". Pop"5 6               

This code is used in the top right-hand corner of the menu, meaning that except for the ". Pop" element block, click ". Pop" to hide the 、、、

1 target.closest (". Pop"). Length = = 0

This code can be said to be the most difficult piece of code in this small function, target is the object, detailed explanation:

the meaning of E.target $ (function(){    $("Li:has (UL)"). Click (function(e) {if( This==e.target) {            $( This). Children (). Toggle (); $( This). CSS ("List-style-image", ($ ( This). Children (). Is (": Hidden")? " URL (plus.gif) ":" URL (minus.gif) "))        }        return false;//Avoid unnecessary event blending}). css ("cursor", "pointer"). Click ();//Trigger Click events when loading       //for menus with no children, unified settings$ ("Li:not (: Has (UL))"). css ({"Cursor": "Default",        "List-style-image": "None"    });});===========================Specific problem specific analysis; The current target represents the Click Object in the Events event; Loader event: Load object; E is just a parameter, arbitrary value; E.target is the target object, and E.event is the event that the target occurs. 

2. Text overflow part hides and adds ellipsis: overflow:hidden;white-space:nowrap;text-overflow:ellipsis;

Mobile Website Development Summary 2

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.