Cannot programmatically trigger jQuery click event

后端 未结 9 2233
心在旅途
心在旅途 2020-12-20 16:39

If I understand correctly, to programmatically trigger a jQuery click event attached to an object with a css class of my-button, you should be able to just do t

9条回答
  •  既然无缘
    2020-12-20 17:14

    Odd. Have you tried .trigger('click')? Theoretically, they should be the same (looking into jQuery code right now to find out). Edit: It appears .click() is simply a proxy for .trigger('click'), so it probably won't help.

    For debugging, try to bind a live click event on the page that the widget is loaded in to.

提交回复
热议问题