How to find two events

This question already has an answer here:

  • jQuery multiple events to trigger the same function 10 answers

  • Read the documentation of the tools you use.

    .on( events [, selector ] [, data ], handler )

    events

    Type: String

    One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".

    So add a space between the events

    $('.series input').on('change keyup', do_something);
    
    链接地址: http://www.djcxy.com/p/96912.html

    上一篇: 多个事件在jquery中调用相同的函数

    下一篇: 如何找到两个事件