How to use jquery to select all the children of an element as well as all images
$('img, div.name < *')
Only returns the first children but i need all of them. I can do it in two statements, bu开发者_开发技巧t i need to do it in one since i want to :not the expression.
:not ( $('div.name').children() + $('img') )
Is what i'm trying to achieve. Thanks!
$('div.name > *, img');
should do it.
If you're trying to select descendants, not just direct children, use *
$('img, div.name *')
>
will only get you the direct children of that object, but it might not matter
精彩评论