Code:
<input type="radio" value="x" name="a" />One<br />
<input type="radio" value="y" name="b" />Two<br />
....
I have many of radio
buttons like above.
How can I get text string after a radio
when it has been clicked?
jQuery:
$(document).ready(function() {
$("input[type=radio]").click(function(e) {
var radioText = e.currentTarget.nextSibling.data
alert(radioText);
});
});
0 Comments