A few "no" conditions in the $$ CSS selector prototype

I am trying to exclude two cases in my CSS selector. Currently, the selector is as follows:

$$('select:not([class=session])').each(function(){
    //blah blah
})

But I want to exclude another class called "sessionproperties"

Is there a way to exclude more than one from one selector operator? Any help on this is welcome.

note: I tried using the ~ = operator for the word "session", but it doesnโ€™t work for me completely.

+3
source share
2 answers

I donโ€™t know why a class attribute is needed, why a selector is needed .. You can comma separate subselectors in :notexactly the same way as you can when you define them in your stylesheet.

$$('select:not(.session, .sessionproperties)').each(function() {
 ...
})
+6

CSS3,

?

$$('select:not([class=session]), select:not([class=sessionproperties]').each(function(){
    //blah blah
})
0

Source: https://habr.com/ru/post/1785975/


All Articles