I am trying to test if the HTML attribute is present and get the value using has Attribute("tabindex") property. But I am getting the below error:
Unable to get property 'hasAttribute' of undefined or null reference
I am using jGrid and jQuery. If the attribute is present I am trying to get the value of that particular td.
Please refer to the code below:
<tr class="jqgrow ui-row-ltr ui-widget-content myAltRowClassEven ui-state-highlight" tabindex="0" id="2" role="row" aria-selected="true">
<td aria-describedby="jqGrid11_cname" title=" TESTTHIS" class="zeroBorderRight" style="text-align: left; height: 20px;" role="gridcell">
TESTTHIS
</td>
</tr>
Try this:
$("#item").attr("tabindex")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With