tags:

views:

63

answers:

1

How would I hide all of the 'select' html elements within a specific div using jquery?

Thanks

+5  A: 

If the div has class "yourClass", then you can use:

$('div.yourClass').find('select').hide();

If you identify the div by id, then it is better to use only id in the selector:

$('#divId').find('select').hide();

You can also save one function call by using "ancestor descendant" selector:

$('#divId select').hide();
Sagi
+1 I would go with divId generally
Mahesh Velaga
Perfect! Thank you.
Probocop