【发布时间】:2016-04-05 14:29:23
【问题描述】:
我在Kendo UI Window 上有两个或更多按钮,在某些业务逻辑之后,它们迟早都会调用.close() 事件。
例如,下面的屏幕:“关闭”按钮将直接关闭窗口,而“保存”按钮将检查某些条件然后触发关闭。
现在,我已经添加了我的条件
that.bind('close', function(){
//check some condition
// here if condition met, let the flow continue else call preventDefault()
});
当两个按钮都被单击时触发此拦截。如何检查哪个按钮触发了事件?
FYA,我已经扩展了 Kendo UI 窗口小部件,因此 that.bind() 拦截已经到位。
【问题讨论】:
标签: javascript jquery kendo-ui kendo-window