Hide all select elements within a div using jquery?
How would I hide all of the 'se开发者_C百科lect' html elements within a specific div using jquery?
Thanks
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();
精彩评论