We help IT Professionals succeed at work.

Hide a client side dropdown using Jquery

sivaman
sivaman asked
on
Hi,

How to hide a client side dropdown using Jquery?. I tried the

 $("#ddlSalesRep").attr("visibility","hidden");. Does seem to work. I'm new to Jquery.

Anyones help will be appreicated.

Thanks
Siva
Comment
Watch Question

Put the dropdown inside a div and then:

$('#someDivId').hide();

Open in new window

Author

Commented:
why it should be inside a div? Cant we not hide it when its in a <td> ??
why can't it be inside a div ?

<td> <div id="myDiv"> <select></select> </div></td>

I guess you can also do this  <select id="myCombo"></select>

$('#myCombo').hide();
you are creating a form with tables inside ?? i strongly recommend not to use tables for that porpouse.
 read here: http://www.hotdesign.com/seybold/everything.html