I'm being asked if there is a difference between two variations on a theme and I honestly don't know the answer.
Given the following two functions:
$("table").each(function(){
$("td", this).live("hover", function(){
$(this).toggleClass("hover");
});
});
$("table td").each(function(){
$(this).live("hover", function(){
$(this).toggleClass("hover");
});
});
Does one offer better performance over the other? Why?