optimal-select icon indicating copy to clipboard operation
optimal-select copied to clipboard

No clues about ignoring certain list of elements

Open entrptaher opened this issue 8 years ago • 4 comments

We have a list of selectors, a list of rejected elements. We can select elements well and get short selector, but how to get the proper selectors and ignore those rejected elements?

If I try to ignore the elements using traverseNode of Skip example, the traverseNode returns the whole document. If I use classes, the className returns only class instead of a list or array of classes.

If we have multiple elements .under.blue and .under.red and we only want to get .under.blue and reject .under.red.

To sum it up, how do we ignore a list of elements properly?

entrptaher avatar Apr 21 '17 13:04 entrptaher

+1

Seems this is related to TODO item:

consider :not - selector to exclude other elements matching (for multiple element matching consider the :not selector to exclude exceptions)

michaelcpuckett avatar May 22 '19 08:05 michaelcpuckett

No progress in 2 years. :D Optimal Select is very optimal that I get worried I'll break something if I touch it to add this functionality.

entrptaher avatar May 22 '19 13:05 entrptaher

Lost a track of time. An update which addresses the existing PRs and the mentioned issue here is in work. Will hopefully finish it this summer. Sorry for the inconvenience 😓

autarc avatar May 22 '19 15:05 autarc

I used another jQuery based library called selector gadget, dom selector tool and with optimal select for last two years since my first post here.

I've been using it and I think we can definitely work on something. Even right now I'm using that library with jQuery just because the multi selector on optimal select does not allow to ignore list of DOM elements.

I'll try to experiment with this more. Good to see the project did not die.

Let me know how i can be of help.

entrptaher avatar May 23 '19 05:05 entrptaher