$("#color").change(function() { if($(this).val() == 2) { $("#buttons").hide(): } else { $("#buttons").show(); } });
On Tue, Jun 16, 2009 at 11:09 AM, ciupaz <luigi.zambe...@gmail.com> wrote: > > Hi all, > I have a select option like this: > > <select id="color" name="color"> > <option value="">Select a color</option> > <option value="1">Red</option> > <option value="2">Green</option> > <option value="3">Blue</option> > <option value="4">White</option> > <option value="5">Black</option> > </select> > > > and a button: > > <div id="buttons" class="sportelloamiacque_formline"> > <input type="submit" id="submitButton" name="submitButton" > value="Continue" /> > </div> > > How can I hide the button is the combo has "Select a color" selected, > and show the button when the user select a color? > > Thanks in advance. > > Luis