如何禁用一个jQueryUI的按钮 [英] How do I disable a jqueryui button

查看:190
本文介绍了如何禁用一个jQueryUI的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击一个jQuery UI的按钮,它仍然触发click事件回调。我如何阻止这一事件?我必须手动保持状态的轨迹还是jQuery UI的照顾,对我?

When I click on a jquery ui button, it still triggers the click event callback. How do I block that event? Do I have to manually keep track of the state or does jquery ui take care of that for me?

推荐答案

试试这个。

$('#button_id').button("disable");
$('#button_id').button("enable");

这篇关于如何禁用一个jQueryUI的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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