This article mainly introduces jQuery's method of preventing multiple click double-click submissions and passing dynamic functions, for more information about JQ double-click events, refer to the section on preventing multiple submissions. You can use functions to define them in batches to improve the accessibility, events that dynamically bind elements through methods. In addition, the function name or multiple parameters can be dynamically transferred (only the function name can be called through Eval in this instance ).
We all know that in jQuery event binding, the double-click event (dblclick) is triggered twice ). A Tag Element (such as p). If the element is bound with a click event or a double-click event (dblclick, the double-click event (dblclick) is not triggered. When the double-click event (dblclick) is executed, two click events are triggered ).
Let's take a look at the execution sequence of click events:
Click: mousedown, mouseout, click;
Double-click: mousedown, mouseout, click, mousedown, mouseout, click, dblclick;
In the double-click event (dblclick), the first click event will be blocked for the second time. That is to say, Double click Event (dblclick) returns the result of one click event and one double click event (dblclick. Instead of double-clicking the event result and clicking the event result ).
In this case, you only need to delete the redundant click Event (click), and this problem is solved.
The effect is as follows:
Http://images.cnitblog.com/ I /554071/201404/010846579687197.png
The source code is as follows:
The Code is as follows:
JQuery prevents multiple click double-click operations and transmits dynamic Functions