First, let's look at the basic rules and issues of object-oriented practice:First write the normal writing, and then change the object-oriented wording
Common method variants• Do not show function nesting functions as much as possible• Can
This paper illustrates the method of rolling and inertia easing of JS+HTML5 mobile phone development. Share to everyone for your reference, specific as follows:
1. The following are three ways to achieve scrolling:
1) using native CSS attributes
First, take a look at the basic rules and issues of object-oriented practice:
Write the common wording first, then change to the object-oriented writingNormal method of deformation
• Try not to show function nesting functions• Can have global
Specific parameters can refer to:Parameters
Type
Describe
Width
String
Select2 container div for controlling width style properties
Minimuminputlength
Int
Minimum number of characters
HTML:
JS:
1 window. onload = function (e) {2 var text = document. getelementbyid ("only"), pattern =/\ D/, // pattern matches the number key 3 pattern2 =/(9 [6-9]) on a letter. | (10 [0-5]) | 3 (7 | 9) // pattern2 matches the numeric key on the
First of all thanks to the jQuery. Select. js author Zhang Jingwei, jQuery. Select. js Project address: http://www.zhangjingwei.com/archives/jquery-select%E5%8D%95%E9%80%89-%E6%A8%A1%E6%8B%9F%E6%8F%92%E4%BB%B6-v1-3-6/The project needs to use the
(1) jquery binding eventAt present, more than 1.7 of jquery event bindings have replaced the original bind with on;Difference: (personal understanding) bind is a binding event to each sub-node; on is only bound to the parent node, and then bubbles
At present, more than 1.7 of jquery's event binding has replaced the original bind with on. Next we will introduce the usage of bind and the input textare event. If you are interested, refer(1) jquery binding event At present, more than 1.7 of
At present, more than 1.7 of jquery's event binding has replaced the original bind with on. Next we will introduce the usage of bind and the input textare event. If you are interested, refer
(1) jquery binding event At present, more than 1.7 of
Original link http://ymblog.net/2016/03/28/by mobile page Click through the thought ofFirst I think of what:
How the click-Through is caused
How to Solve
What is event impersonation
First, how is the click penetration
Check to see if jQuery is loading
Before you do anything with jQuery, you need to verify that it is loaded:
if (typeof jquery = = ' undefined ') {
console.log (' jquery hasn\ ' t loaded ');
} else {
console.log (' jquery has lo Aded ');
}
Html:
Copy Code code as follows:
Js:
Window.onload=function (e) {var Text=document.getelementbyid ("only"), Pattern=/\d/,//pattern match the number key on the letter pattern2=/(9[ 6-9]) | (10[0-5]) |3 (7|9)/,//pattern2
In order to obtain the user's profile picture and user name, the simulated login problem on the public platform is checked. only simulated login is supported.
The following figure shows the simulated login code using snoopy:
Submit ($ submit, $
The event handler refers to the method called when some events occur in HTML. Terms are often used when an event is triggered (or triggered. Usually put the jQuery code inSome event handling methods are as follows:
Jquery binding event
At present,
(1) jquery binding eventAt present, more than 1.7 of jquery event bindings have replaced the original bind with on;Difference: (personal understanding) bind is a binding event to each sub-node; on is only bound to the parent node, and then bubbles
At present, more than 1.7 of jquery's event binding has replaced the original bind with on. Next we will introduce the usage of bind and the inputtextare event. If you are interested, refer
(1) jquery binding eventAt present, more than 1.7 of jquery
This article mainly introduces Jquery skills (must be mastered). For more information, see
Check whether jQuery Loads
Before using jQuery for any operations, you need to confirm that it has been loaded:
if (typeof jQuery == 'undefined')
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.