I want to change the background color of li element to be changed when clicked. So when the user clicks on first li, the background color should be in red, and when he clicks second one, the second one should change to red, but the first one should go to white.
In short, the background color of selected li should be changed to show it is highlighted.
Also the checkbox should also be checked for only selected li.
I have tried to do like below. But it is changing for all selected li's..