Answers for "change style of clicked element jquery"

1

jquery onlcick css change

$('.colors-list li').click(function(e){
    $('.results').css('background-color', 'red');
});
Posted by: Guest on March-19-2021
0

onclick jquery add css

$('.colors-list li').click(function(e){
    var color = $(this).text();
    $('.results').css('background-color',color);
});
Posted by: Guest on March-17-2022

Code answers related to "change style of clicked element jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language