javascript - hide textfields instantly when check a radio button -


what want when user chooses first option textfield disappear , when users chooses second textfield appear again instantly. here's code:

<input type="radio" name="radiogroup0" value="1" id="student"  /> <input type="radio" name="radiogroup0" value="0" id="not student"  /> 

and want hide/show this:

<label for="department">department:</label> <input name="department" type="text" class="label" value=""  /> 

i have tried i'll appreciate answer

on click, keyup, , change events, show or hide appropriate elements (jquery makes easier). reason handling events value change may triggered after element loses focus.

happy coding.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -