<p id="noteTypebox">
<label for="noteType_2" class="notetypelabel" id="noteType_2" >
<input type="radio" name="noteTypeID" value="2" class="notetype">IDI</input>
</label>
</p>
Given the code above, I would like JQUERY code that Binds to the LABEL, since the INPUT box is hidden (I don't want the radio buttons on the apge).
When a user clicks on a label, it should trigger the JQUERY function and provide the value of the INPUT associated with the label. For example, if a user clicked on label for="noteType_1", it would be able to alert noteType_1 & 1
Here is my current code, I could use your help! thanks
$( document ).ready( function() {
$('#noteTypebox:label').click(radioClicks)
});
function radioClicks() {
alert(input name + input value);
return false;
};
Thanks