How to check if DIV element is disabled using jquery
asp.net, html, jquery
Solution
ASP.NET allows you to set `Disabled` attribute on any HtmlControl object. And in your example it renders as
`<div id="divUndo" disabled="disabled"><div>`
and in javascript can be checked like
$('#divUndo').attr('disabled') !== undefined
But according to W3C
The following elements support the disabled attribute: BUTTON, INPUT, OPTGROUP, OPTION, SELECT, and TEXTAREA.
Therefore it may not work or work differently in different browsers. You shouldn't rely on using `disabled` attribute on `div` in your javascript or css.
Problem
htmlcode: ``` div id="divUndo" runat="server" ``` I am disabling divUndo in the code-behind under certain conditions using the below statement. VB.NET: ``` divUndo.disabled=true ``` How can I check if the "`divUndo`" is disabled or not using jquery?