Is there any selector engine for DOM elements like jQuery which offers no other extended methods like .bind, .css etc? What I mean is, a selector which just return found elements, nothing more. I tried to modify the jQuery, removed methods to get only the function that returns elements, but I got errors.
Thanks in advance!
Have you looked at sizzle -
http://sizzlejs.com/
I believe it is the selector engine that jQuery uses.
If you code is intended to work only in modern browsers and the set of possible selectors is relatively simple (A.classA B.classB or something) you can use document.querySelectorAll with a thin wrapper over it or even do not use any frameworks at all.
As for old browsers, well, you always can try to implement it yourself, if size is so crucial for you. You can choose a tiny set of simple CSS selectors and use only them.
But, as well ipr101, I guess it will be better to use production-ready solution like sizzle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With