Hi, I’m making an filter page:
https://www.csdiamond.hk/copy-of-3
People can select what they want to see. Like:
I built the button FL and IF by code:
let clarityFL_C, clarityIF_C = true ;
export function clarityFL_click(event, $w) {
//Add your code for this event here:
if (clarityFL_C === false ) {
$w(“#clarityFL”).style.backgroundColor = “#F2CA00”;
clarityFL_C = true ;
clarityFL = “FL”;
console.log(clarityFL);
} else {
$w(“#clarityFL”).style.backgroundColor = “#D1D1D1”;
clarityFL_C = false ;
clarityFL = “”;
console.log(clarityFL);
}
}
export function clarityIF_click(event, $w) {
//Add your code for this event here:
if (clarityIF_C === false ) {
$w(“#clarityIF”).style.backgroundColor = “#F2CA00”;
clarityIF_C = true ;
clarityFL = “IF”;
console.log(clarityFL);
} else {
$w(“#clarityIF”).style.backgroundColor = “#D1D1D1”;
clarityIF_C = false ;
clarityIF = “”;
console.log(clarityIF);
}
}
How can I finish the multiple choose function? Should I use .setFilter( wixData.filter())? Or others method?