且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在javascript函数中的jquery需要两次点击

更新时间:2023-02-05 20:34:47

需要你在里面设置的点击事件处理程序,那意味着它不会被设置,直到你运行 .kb_edit()

If the functionality in the plugin requires the click event handler that you're setting up inside, then that means it won't be set up until you run .kb_edit().

因此,第一次点击运行 .kb_edit(),它会设置点击处理程序。

So the first click runs .kb_edit(), which sets up the click handler.

然后,第二次点击实际上会触发第一次点击设置的内容。

Then the second click actually gets to trigger whatever was set up by the first click.