Learn about jQuery's event dblclick and jquery event dblclick
Insus. NET has always been developed by asp.net and uses less javascript. Now we are learning asp.net mvc. jQuery is a required client language.
Don't worry, take it easy. Step by step. This exercise shows the jQuery event dblclick.
Create an Action in the controller, that is, the operation:
With the operation, you must have a view to support it:
The above function is to double-click the text box. If you double-click an empty text box, it will prompt you to enter a value. If you double-click a text box that already contains a value, it will not do anything.
Demo:
Events passed by JQUERY
Use bind and unbind.
You mean that the event processing function is the same function.
Assume function doEvent ($ this ){};
Var $ elem = $ ("# id ");
If (on ){
$ Elem. bind ("click", function (){
DoEvent ($ (this ));
});
$ Elem. unbind ("dbclick ");
} Else {
$ Elem. bind ("dbclick", function (){
DoEvent ($ (this ));
});
$ Elem. unbind ("click ");
}
In jQuery, the bind () method problem. The following code replaces the click event with dbclick. Why is it ineffective?
Dblclick
Written on the api