Filter images in your gallery without adding code or external plugins

hi i am following you on all of this, and got it to work, except when I have multiple classes attached to one item. For example (per your example) I can get the individual items to filter correctly (i.e. cherries, tulips), but adding another class to them (fruits or flowers) stops working for me. I am using your example to filter a different set of images on my site and running into problems when I have more than one class that I am filtering. I added an extra layer of complication because I have the images inside an image slider. So I have to attach the classes to each slide, to make them disappear.