I'm facing an issue with using the function I created. The codes are provided below and I keep encountering a "not a function error."
var adjustTransparency = function () { //defining the function
if ($(this).css('opacity') < '0.90') {
$(this).css('opacity', '1.00');
}
else {
$(this).css('opacity', '0.20');
}
return $(this);
};
$("#image").on("click", function () { //calling the function
$(this).adjustTransparency();
});