here’s a question for the logically endowed. I’m using isotope, a badass jquery mozaic tool that does, among other awesome things, animated filtering of data via code like this …
$('#container').isotope({ filter: '.metal' });
You can also do an AND for multiple selectors …
$('#container').isotope({ filter: '.alkali, .alkaline-earth' });
… where anything with class alkali OR class alkaline-earth are selected.
I’m looking for a way to filter the “logical AND” (aka “logical conjunction”), showing ONLY elements where BOTH alkalai AND alkaline-earth classes exist.
I found this stackoverflow answer … How do I combine logical OR with logical AND within a jQuery attribute selector? … but isotope probably needs something more specific in the filter parameter.
Any ideas?
What about:
That’s the common way to select elements that have both class names defined.