Rails 怎样 detach ujs 绑定的那些事件?

frankel · September 26, 2013 · Last by luikore replied at September 30, 2013 · 1919 hits

比如绑定了某个 button 的 confirm 对话框,业务逻辑上后来有需要 detach 这个 confirm 对话框,该怎么操作?

是怎么绑定的?data-confirm 的话就去掉属性 on 绑的事件,就 off 关掉 bind 绑的事件,就 unbind 关掉

http://api.jquery.com/unbind/

You need to Sign in before reply, if you don't have an account, please Sign up first.