set value of textarea using radio button jquery -


i'm trying set value of textarea using jquery.

this code:

$(document).ready(function () {     // $('#bericht').val('foobar');      $('input[name=taal]:radio').click(function () {         alert('click');         $('#bericht').val('foobar');     }); }); 

when uncommenting 2nd line works fine. alert works when clicking. value never set when clicking radio button... how be?

try demo

$('input[name="taal"]').click(function () {     alert('click');     $('#bericht').val('foobar'); }); 

or

$('input:radio[name="taal"]').click(function () {     alert('click');     $('#bericht').val('foobar'); }); 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -