Closed fiote closed 3 years ago
:visible
is actually a custom pseudo selector added by jQuery. However, you can add this yourself without adding the rest of jQuery. See https://github.com/jquery/jquery/blob/main/src/css/hiddenVisibleSelectors.js
Sizzle.selectors.pseudo.visible = function visibleSelector( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
}
Thanks a LOT @timmywil \o/
I'm using Sizzle as a standalone lib without jquery (cloned the git, npm run builded it and included the min.js file on my project).
For most part it works great, but I'm trying to use the :visible pseudo-selector and it's saying it's not supported. Is there some parameter/option I need to set/enable to make it work when building the project or something like that?