开发者_如何学Pythoni am trying to prevent all elements within a div from being selected. this is not working.
$('*').not('#someid > *')
The only problem with your approach is that you're asking for immediate children. If you remove the > it should work fine:
$('*').not('#someid *');
Use filter():
$("*").filter(function() {
    return !$(this).closest("#someid").length;
})
...actually doing some more testing, this should also work:
$("*:not(#someid *)")
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论