Rob Gonda's Blog

dhtml syntax showdown

just found this really nice blog entry showing different code techniques or styles to achieve the same purpose using various dhtml tool. The idea is the usual alternate row styles, written with DOM, YUI, Dojo, Mochikit, mootools, and jquery. I am a big jquery fan, and this may not be enough to convert you, but it should give you an idea of how easy the syntax is.

btw, I love one of the comments showing how to add hovers too... it's a beautiful toolkit.

$("tr:nth-child(odd)").addClass("odd");

$("tr:nth-child(odd)").hover(function(){
$(this).addClass("odd_over");
},function(){
$(this).addClass("odd_out");
});

$("tr:nth-child(even)").hover(function(){
$(this).addClass("even_over");
},function(){
$(this).addClass("even_out");

});

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?7D7A3BA2-3048-7431-E4E4494C5085EC93

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This blog is running version 5.9.003. Contact Blog Owner