jquery 1.4.2 update
jquery 1.4.2 update
Hello Allan,
Did you see the new delegate update to 1.4.2? Might come in handy on DataTables
this...
[code]
$("table").delegate("td", "hover", function(){
$(this).toggleClass("hover");
});
[/code]
simplifies this...
[code]
$("table").each(function(){
$("td", this).live("hover", function(){
$(this).toggleClass("hover");
});
});
[/code]
Here's the info: http://blog.jquery.com/2010/02/19/jquery-142-released/
Patrick
Did you see the new delegate update to 1.4.2? Might come in handy on DataTables
this...
[code]
$("table").delegate("td", "hover", function(){
$(this).toggleClass("hover");
});
[/code]
simplifies this...
[code]
$("table").each(function(){
$("td", this).live("hover", function(){
$(this).toggleClass("hover");
});
});
[/code]
Here's the info: http://blog.jquery.com/2010/02/19/jquery-142-released/
Patrick
This discussion has been closed.
Replies
[code]
$("table td", this).live("hover", function(){ ... });
[/code]
Having said that - it does look like something which will help. Anything which improves support for event delegation I'm all for!
Allan