As you can see, I am trying to pass in the the style property as a parameter which I can edit on my function call. It does not work and I honestly have no idea why. What could the cause be? Do I have to pass the parameter on to my 'click', function(prop) as well?
var clicked = false;
function filter(elem, prop) {
var elem;
var prop;
document.getElementById(elem).addEventListener('click', function() {
if (clicked == false) {
this.style.prop = 'blur(40px)';
clicked = true;
}
else {
this.style.prop = 'blur(0px)';
clicked = !clicked;
}
console.log(clicked);
});
};
filter('case', 'filter');