问题
I have a small issue with the isotope plugin. When my web page is loaded, Isotope will display all the elements. I'd like to have it display a single category instead. How can i achieve it?
Thanks in advance for your help!
回答1:
Just supply a filter in the options of your initial call to isotope that will select only the items you want:
$('#someid').isotope({filter: '.someclassonMyCategoryElements'});
PS. It would help if you show your existing code, so we all have some context to work from :)
来源:https://stackoverflow.com/questions/16666776/isotope-start-with-specific-category-rather-than-all-elements