Zepto.js doesn't return false?

梦想与她 提交于 2019-12-07 13:49:21

问题


I'm trying to bind an event handler to a click function using zepto.js. Normally in JQuery I can just say return false and the actual click will never go through. Does Zepto not support this? And if so, how to get around this?


回答1:


To duplicate the behaviour of returning false in a jQuery event handler you need to call event.preventDefault() and event.stopPropagation().



来源:https://stackoverflow.com/questions/6207956/zepto-js-doesnt-return-false

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!