Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr>
- <td align="left" style="width: 300px">
- <div id="div_s_0">
- <input type="radio" name="s_0" value="1" />Public
- <input type="radio" name="s_0" value="2" />Not Public
- <input type="radio" name="s_0" value="3" />Confidential
- </div>
- </td>
- </tr>
- <tr>
- <td align="left" style="width: 300px">
- <div id="div_s_1">
- <input type="radio" name="s_1" value="1" />Public
- <input type="radio" name="s_1" value="2" />Not Public
- <input type="radio" name="s_1" value="3" />Confidential
- </div>
- </td>
- </tr>
- $(document).ready(function() {
- $("input:radio").click(function() {
- var index = parseInt(this.name.split('_')[1])
- });
- });
- $($("table").children()[0]).children().length
- var rowIndex = $("#mytable tr").index($(this).parents("tr"));
- var inputName = $(this).attr("name");
- alert("Input Name: " + inputName + "; RowIndex: " + rowIndex);
- $("#div_s_0 input[type='radio']").onclick = function() {
- if ($("#div_s_0 input[type='radio']:last").attr('checked') == 'checked') {
- /* add a new element */
- }
- }
Add Comment
Please, Sign In to add comment