how to know which radio button id selected of which row?

user944513

I have make a demo in which I make rows with ids tc_1, tc_2, tc_3 …… and so on.

When I expand a row, I have two options and a button. I need to get know which row id and which option is selected?

Example: I expand second row, It should alert tc_1 with option select Add test case.

$('#list').on('click','.addClickClass',function(){
    alert('hii')
});
Shomz

To get the row id and the value of checked radio, use this:

$('#list').on('click','.addClickClass',function(){
     alert($(this).parents('li[id*="tc"]').attr('id') + "\n" 
         + $(this).parents('.ui-collapsible').find('input:checked').val())
 })

It gives you output like this, for example:

tc_1
TestCommand

which I believe is exactly what you're looking for.

I used this to fetch the row id:

$(this).parents('li[id*="tc"]').attr('id')

and this to get the checked radio value:

$(this).parents('.ui-collapsible').find('input:checked').val()

Both related to the clicked Add button.

See it in action here: http://jsfiddle.net/R2DzV/16/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to know which radio button is selected in jquery?

From Java

How can I know which radio button is selected via jQuery?

From Dev

how to know which radio button is selected out of all options?

From Dev

How to find out which radio button the user selected in Javascript?

From Dev

How to check which radio button is selected if they're all runat server?

From Dev

How to retrieve which radio button within a LI is selected

From Dev

How to check which radio button is selected if they're all runat server?

From Dev

How to swap the displayed image based on which radio button is selected?

From Dev

How to disable buttons based on which radio button is selected?

From Dev

How to know which button the user selected on <paper-dialog>?

From Dev

How to know which button the user selected on <paper-dialog>?

From Dev

How to know which imageview is selected

From Dev

How to know in which row a button is clicked in asp.net gridView

From Dev

How to know in which row a button is clicked in asp.net gridView

From Dev

How do I check which radio button is selected when there are multiple radio buttons with the same name? (using jquery)

From Dev

How do I know which value is selected

From Dev

How can I tell which radio button is selected with node.js

From Dev

How to get list of values which are selected in radio button after click on submit in Angular js

From Dev

how to check which radio button is checked in android?

From Java

how to know which button is clicked in other activity

From Dev

How to know which activity clicked the button?

From Dev

How to know which button was clicked in Qt?

From Dev

How to know which activity clicked the button?

From Dev

how to know on which button user made click?

From Dev

how can i know which button is cliked

From Dev

How to know in which item a button was clicked

From Dev

How to know which button was clicked in Qt?

From Dev

How to get last selected radio button id

From Dev

mysql_fetch_row : how does it know which row?

Related Related

  1. 1

    How to know which radio button is selected in jquery?

  2. 2

    How can I know which radio button is selected via jQuery?

  3. 3

    how to know which radio button is selected out of all options?

  4. 4

    How to find out which radio button the user selected in Javascript?

  5. 5

    How to check which radio button is selected if they're all runat server?

  6. 6

    How to retrieve which radio button within a LI is selected

  7. 7

    How to check which radio button is selected if they're all runat server?

  8. 8

    How to swap the displayed image based on which radio button is selected?

  9. 9

    How to disable buttons based on which radio button is selected?

  10. 10

    How to know which button the user selected on <paper-dialog>?

  11. 11

    How to know which button the user selected on <paper-dialog>?

  12. 12

    How to know which imageview is selected

  13. 13

    How to know in which row a button is clicked in asp.net gridView

  14. 14

    How to know in which row a button is clicked in asp.net gridView

  15. 15

    How do I check which radio button is selected when there are multiple radio buttons with the same name? (using jquery)

  16. 16

    How do I know which value is selected

  17. 17

    How can I tell which radio button is selected with node.js

  18. 18

    How to get list of values which are selected in radio button after click on submit in Angular js

  19. 19

    how to check which radio button is checked in android?

  20. 20

    how to know which button is clicked in other activity

  21. 21

    How to know which activity clicked the button?

  22. 22

    How to know which button was clicked in Qt?

  23. 23

    How to know which activity clicked the button?

  24. 24

    how to know on which button user made click?

  25. 25

    how can i know which button is cliked

  26. 26

    How to know in which item a button was clicked

  27. 27

    How to know which button was clicked in Qt?

  28. 28

    How to get last selected radio button id

  29. 29

    mysql_fetch_row : how does it know which row?

HotTag

Archive