jQuery show/hide select and button -
i wondering how can show different buttons once click it. example:
<input type="button" value="submit" id="button1"> <input type="button" value="submit" id="button2" style="display: none;"> <input type="button" value="submit" id="button3" style="display: none;"> <select id="whatever"> <option id="1">1</select> <option id="2">2</select> <option id="3">3</select> </select> <select id="whatever2" style="display: none;"> <option id="1">1</select> <option id="2">2</select> <option id="3">3</select> </select>
i want button1 show select id "whatever" , button 2 hide select id="whatever" , show "whatever2" , button 3 same thing. thanks!
button1
$( "#button1" ).click(function() { $( "#whatever" ).show(); });
button2
$( "#button2" ).click(function() { $( "#whatever" ).hide();$( "#whatever2" ).show(); });
and on
Comments
Post a Comment