JQuery replace one class with another
<p>I have this jquery and I'm changing styles in it but I've heard that the correct way to do it is to create a separate style and just replace classes with jquery. Can you explain me how to do it correctly:</p>

<pre><code>$('.corpo_buttons_asia').click(function(){ 


                $('.info').css('visibility', 'hidden');
                $('.info2').css('visibility', 'visible');
                $(this).css('z-index', '20');
                $(this).css('background-color', 'rgb(23,55,94)');
                $(this).css('color', '#FFF');
                $('.corpo_buttons_global').css('background-color', 'rgb(197,197,197)');
                $('.corpo_buttons_global').css('color', '#383838');

        }); 

        $('.corpo_buttons_global').click(function(){ 


                $('.info').css('visibility', 'visible');
                $('.info2').css('visibility', 'hidden');
                $(this).css('background-color', 'rgb(23,55,94)');
                $(this).css('color', '#FFF');
                $('.corpo_buttons_asia').css('z-index', '2');
                $('.corpo_buttons_asia').css('background-color', 'rgb(197,197,197)');
                $('.corpo_buttons_asia').css('color', '#383838');


        }); 
</code></pre>

<p>So instead of using .css() all the time I can create another class and just replace it with jquery. Thanks.</p>
