jquery 事件监听

jQuery中提供了四种事件监听方式,分别是bind、live、delegate、on,对应的解除监听的函数分别是unbind、die、undelegate、off。

bind(type,[data],function(eventObject))

  在选择到的元素上绑定特定事件类型的监听函数,参数的含义如下:

  type:事件类型,如click、change、mouseover等;

  data:传入监听函数的参数,通过event.data取到。可选;

  function:监听函数,可传入event对象,这里的event是jQuery封装的event对象,与原生的event对象有区别,使用时需要注意。

参考:http://www.cnblogs.com/lvdabao/p/3290603.html