I've looked all over for some clear documentation on this syntax. It is used to create custom filters to select very specific elements in the DOM. There is a good example by Benjamin Arthur Lupton in the ajaxify-html5.js gist example (see line 45 where the function is defined and line 78 where it is used), which he provides to show how to ajaxify a web site using his history plug-in.
There is also a fairly extensive blog by Shane Riley called Adding Filter Expressions, but I've scoured through the jQuery documentation and I can't find any documentation.
I would be grateful if you could either
expr
functionI've looked at jQuery.filter
but can't figure out an alternative to Lupton's technique in his ajaxify script.
I'm keen to work with a recent jQuery. I'm working with v 1.8.2 and will be aiming to upgrade to 1.9.x soon.
It's part of Sizzle which is the selector engine that jQuery uses.
They now have documentation explaining its usage with examples for pre and post 1.8.x: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation#-pseudo-selectors
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