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