I have this HTML:
<input class="radio" type="radio" name="which_app" value="" id="whichApp1" required>
<label class="left-narrow" for="whichApp1">Program #1</label><br />
<input class="radio" type="radio" name="which_app" value="" id="whichApp2">
<label class="left-narrow" for="whichApp2">Program #2</label>
I have this script:
$( 'input[type=radio][name=which_app]' ).change( function() {
var label = $("label[for='"+$(this).attr('id')+"']");
alert( label );
}
I get this pop-up alert:
How can I decode the [object Object] to get the label that was clicked on? (there are other reasons for not using value="" at this time so I am trying to focus solely on the label. Thank you)
