OZONE Asylum
Forums
DHTML/Javascript
Drum roll - twenty liners rules discussion
This page's ID:
29904
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[b]wrayal:[/b] Actually I never used jQuery, or any JS framework/library, but from the time I was coding in C/C++ I always liked chained calls and that a big part of jQuery's syntax. It ends up with things like:[code]$("p.surprise").addClass("ohmy").show("slow");[/code]3 function calls, 1 line[code] $("#orderedlist").find("li").each(function(i) { $(this).append( " BAM! " + i ); });[/code]5 function calls, 2 lines[code] $("dd:not(:first)").hide(); $("dt a").click(function(){ $("dd:visible").slideUp("slow"); $(this).parent().next().slideDown("slow"); return false; });[/code]10 functions calls + a return, 5 lines Well, you get the idea. It can be "abused" to execue a lot of things on one line. So how do you guys feel about that type of syntax in the context of 20 liners ? But at the end of the day, [b]Arthurio[/b] and [b]Iron Wallaby[/b] are dead right. [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_dk.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 01-24-2008 21:53)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »