[jQuery] Put event click on a Radio group

[jQuery] Put event click on a Radio group


Hi!
I have to put a click event on some radio with the same name...
<input type="radio" name="idtypecontent" value="1" /> 1
<input type="radio" name="idtypecontent" value="2" /> 2
<input type="radio" name="idtypecontent" value="3" /> 3
And here my javascript:
$("input[name=idtypecontent]").click(function(){
//test
alert($("input[name=idtypecontent]:checked").val());
});
But i got only a working event on the first radio button.
Is my javascript wrong for what I want?
Thanks!