I have a page full of spans. Each span has 3 radio buttons in it. I have the following click
event wired in a script tag and it works fine in compatibility mode of a browser but not IE9 or
nor Chrome 22.0.1229.94. How can I get the span ID ? I get NaN or undefined.
var _ladderId = $(this).closest('span').attr('id'); alert(_ladderId);
I alos tried to use a hidden value with this script:
var _ladderId3 = $(this).parent().find('.MyLadderId').val();
alert(_ladderId3);
HTML:
<span id=103>
<tr>
<td>
<input type="hidden" name="MyLadderId" value=103 id=103 />
103
</td>
<td>
</td>
<td>
<input class="create" type="radio" name="Disposition" value="P"/> Pass <br />
<input class="create" type="radio" name="Disposition" value="M"/> In Maintenance For Repairs <br />
<input class="create" type="radio" name="Disposition" value="X"/> Removed From Service Permanently <br />
</td>
<td>
<a href="/ladders/ladderinspection/GetHistory/103">Get History</a>
</td>
</tr>
</span>