.bind(eventType, handler(eventObject)) attaches a handler to an event for the selected element(s)
.click() is the same as .bind(‘click’)
.unbind(event) is used to remove a handler previously bound to an element
specific events can also be targeted using unbind()
bind() allows multiple events to be bound to one or more elements with a separated space in between
Demo Example:
original source code
by using .bind() function
unbind above mouseup event if button click
沒有留言:
張貼留言