I have this function which was working:
$('#buttFurniture').click(onFilterCLick);
but then i decided to add some argument to the function and it stopped working:
$('#buttFurniture').click(onFilterCLick(arrOutput, arrFurniture));
full function:
function onFilterCLick(arrFull,arrCurrent) {
$('#buttFurniture').css("background-color", "#F1F1F1");
$('#buttCars').css("background-color", "#F1F1F1");
$('#buttGames').css("background-color", "#F1F1F1");
$('#buttFurniture').css("color", "black");
$('#buttCars').css("color", "black");
$('#buttGames').css("color", "black");
$(this).css("background-color", "#656565");
$(this).css("color", "white");
if (jQuery.inArray(arrCurrent[0], arrFull)) {
console.log("asdasd");
}
}
$('#buttFurniture').click(function() { onFilterCLick(arrOutput, arrFurniture)});