Answers for "css keep focus color on div after click"

CSS
0

css keep focus color on div after click

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<button>Item</button><button>Item</button><button>Item</button>
Posted by: Guest on February-17-2021
0

css keep focus color on div after click

$('button').on('click', function(){
    $('button').removeClass('selected');
    $(this).addClass('selected');
});
Posted by: Guest on February-17-2021
0

css keep focus color on div after click

button.selected{
  color:red;
}
Posted by: Guest on February-17-2021

Browse Popular Code Answers by Language