I have a question about using jQuery to set the padding of a class or id. I am able to successfully change the height of an element with this code:
$('.menu').css({ height: '90px' });
But now, I need to apply a specific CSS rule in jQuery:
style.css
#mainNav > .nav > li.active > a, #mainNav > .nav > li.active {
padding-top: 10px;
}
I tried to translate this into jQuery like so, but it didn't work:
$('#mainNav > .nav > li.active > a, #mainNav > .nav > li.active').css({ padding-top: '10px'});
Can anyone help me figure out how to do this correctly? Thank you!