I want to do a listing with li elements and when I click on one of those <li> s then change the background of the li element and if I click on another than change the other li‘s background and return the other li‘s background to the original color.
Something like this:
<ul>
<li>Option1</li>
<li>Option2</li>
</ul>
and when I click on option 1 highlight its background or put a border, and wen I click on option 2 then return the first divs propietes and change the option 2’s background color.
Try this:
});
Working demo