禁用divs元素的单击 [英] disable clicking of a divs element

查看:71
本文介绍了禁用divs元素的单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有进入编辑模式的div ... div包含按钮,链接++.在编辑模式下,我想禁用所有这些功能,并在退出编辑模式时启用它们.

I have div that goes in to an edit mode... the div contains buttons, links++. In edit mode i want to disable all of these, and enable them when i exit edit mode.

我尝试过

$("#container").children().disableSelection();

但它不起作用:-(

推荐答案

编辑模式输入:

$("#container").children().bind('click', function(){ return false; });

编辑模式退出:

$("#container").children().unbind('click');

这篇关于禁用divs元素的单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆