I have few buttons, all with same class='background'. Now I'm using this to change the background colour of button onclick.
<script>
$(document).ready(function(){
$(".background").click(function(){
$('.background').css('background','rgba(0,0,0,0.2)');
});
});
</script>
But this is changing background of all the buttons. How can I change background of the button which is clicked. NOTE: I've to do this without using id