Using four div
elements, I have implemented a feature where clicking on the first div
causes all other div
elements to change opacity. This is working correctly. However, I would like the opacity of the first div
to remain unchanged when moving to another div
.
$(document).ready(function () {
$(".category-item").click(function () {
$(this).addClass("black");
$(".category-item").addClass("blue");
});
});
Thank you in advance.