How to add a change in the background color of the active block to this script

var $texts = $('.view-source .hide'); $texts.not(':first').hide(); $('.view-source .class_click').on('click', function () { $texts.slideUp(500); $(this).parent().find('.hide').slideDown(500); }); 

    1 answer 1

    If I understand your problem correctly, then you need to use jQuery.css () .

    your_element.css("background-color", your_colour);

    • It works this way, but when you select a new menu, the old one continues to glow - LLIAKAJI
    • @LLIAKAJI it is obvious that the old must be returned to the original color that you need. You can in the same way. - Vartlok