I have this code that detects item clicked. it gets the item title and works great for checking single item. Problem is I would want it to check from multiple words. "Bottle" or "Box" or other word. I'm a newb in programming.
$w("#gallery2").onItemClicked( (event) => {
if ( event.item.title === FilterValue) { console.log("Match"); }}) let FilterValue = "Bottle"
Hello Chriss,
you could make an ARRAY ---> myArray = ["Bottle", "Dog", "Banana", "Bird", "Monkey"]
and then take a loop and loop trough the ARRAY to look for some matching items. When item found, then ---> myCounter = myCounter+1 (myCounter++).