开发者

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜