JQuery binds events and unbinding methods for page Dom elements
- 2020-03-30 02:42:59
- OfStack
1. Bind events
Multiple events can be bound at once
2. Unbind
3. Bind once
$('#id').bind("click",function(){
...
})
Multiple events can be bound at once
$('#id').bind("click mouseover mouseout",function(){
...
})
2. Unbind
$('#id').unbind("click")
3. Bind once
$('#id').one("click",function(){
...
})