开发者

The click event handler added with jQuery's live method gets triggered for a disabled asp.net image button

开发者 https://www.devze.com 2023-03-10 21:58 出处:网络
How do I stop a click event handler added with jQuery\'s live method 开发者_JS百科from getting triggered on an already disabled asp.net image button?

How do I stop a click event handler added with jQuery's live method 开发者_JS百科from getting triggered on an already disabled asp.net image button?

Following is the code snippet.

    $('#<%=imgBtnEdit.ClientID%>').live('click', function () { ... });


Add the :enabled pseudo-selector.

$('#<%=imgBtnEdit.ClientID%>:enabled').live('click', function () { ... });
0

精彩评论

暂无评论...
验证码 换一张
取 消