I am studying jQuery code optimization and wondered if there is a way to improve this code as it seems rather long ...
$("#tabs-nav li a").hover(
function(){
if($(this).parent().hasClass('active')) {
} else {
$(this).stop().animate({ opacity: 1, marginTop: '24px'}, 200);
}
},
function(){
if($(this).parent().hasClass('active')) {
} else {
$(this).stop().animate({ opacity: 0.4, marginTop: '29px'}, 200);
}
}
);
Thank you very much in advance!
user141621
source
share