css keep focus color on div after click

Solutions on MaxInterview for css keep focus color on div after click by the best coders in the world

showing results for - "css keep focus color on div after click"
Alex
12 Mar 2018
1<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
2
3<button>Item</button><button>Item</button><button>Item</button>
4  
Elías
20 May 2016
1$('button').on('click', function(){
2    $('button').removeClass('selected');
3    $(this).addClass('selected');
4});
Darian
30 Apr 2019
1button.selected{
2  color:red;
3}