Alan Gutierrez schrieb:
> I'm now growing partial to this convention...
>
> $("div.grid").grid()
>                  .data(gridData).
>                  .columns(2, 3, 7)
>                     .select()
>                     .sortable()
>                     .grid()
>                  .rowHeight(22)
>                  .jQuery()
>              .show()
>              .css("width", "500px)
>    
> Which is where you return control by naming the object that you wish
> to recover.
>   
I don't see what you gain here. Why don't you stick with simple references?

var grid = $("div.grid");
var gridController = grid.grid(data);
gridController.select().sortable().blablabla();
grid.show().css("width", "500px");

If you don't need the references anyway you don't have any overhead of 
saving them.

Makes debugging much easier anyway: Imagine that you columns() method is 
buggy: The complete chain goes to hell and you have to split it into 
small parts to find the problem.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to