I have been trying to learn how to write faster more efficient jQuery and would like to get some insight on how I should write this function so it will work faster. Should i use variables, I am most concerned with speed on a page so what will run more optimal cross browser and why is the answer I would like to see.
$("#div-one, #div-two").find('tr').hover(function(){
$(this).find('a').stop().animate({color:"#FFF"}, 'fast');
$(this).stop().animate({
backgroundColor:"#7DBE36"
}, 'fast');
}, function(){
$(this).find('a').stop().animate({color:"#000"}, 'fast');
$(this).stop().animate({
backgroundColor:"#FFF"
}, 'fast')
});
Thanks all in advance.