Hi,
Below is a working code.
1. if($('input[name="test"]').is(":checked"))
2. {
3. // my other code
4. }
I want to remove "test" and put a variable there instead
I tried this way but it does not seem to work. I am not sure where I am going wrong. Any help will be highly appreciated.
1. newData="test";
2. if($('input[name=$(newData)]').is(":checked"))
3. {
4. // my other code
5. }