jQuery is a library that acknowledges the existance of the DOM, and
builds on on the DOM. Prototype is a library that focuses on
creating controllers, and looks at the DOM more as a templating
engine, not a data structure in itself.
If all this method does...
var grid = $('#grid').grid()
...is what you suggest below, then I agree that it's probably better
to say that you've creating a controller, and you should use objects
to model these complicated user interfaces.
You've added grid to the namespace of jQuery, but all it is a
constructor. You can use the documentation, but it doesn't buy you
anything.
It's creating a very contentious namespace, the jQuery.fn object,
and I'm kind of surpised to find a lot of singleton objects there.
I'm using a method $.toJSON, it's a jQuery json plugin, but it's
entirely static and has nothing to do with the selection engine.
* Stephen Howard <[EMAIL PROTECTED]> [2006-11-30 17:25]:
> I know we're all fond of the elegance of chaining, but would it be the
> least confusing to write it like:
>
> var gridControl = new Grid( '#grid' )
>
> where:
>
> function Grid( dom_string ) {
>
> jQuery( dom_string ).each( function() { instantiate here... } );
> ...
> }
>
> Remember not everything needs to look like jQuery.
>
> - Stephen
>
> Dave Methvin wrote:
> > This will be a short thread--NOT! :-)
> >
> >
> >> Controller set of methods is returned..
> >>
> >> $('#grid').grid().data(data).drig().show()
> >> $('#grid').grid().scrollToRow(6).drig().css("border", "1px")
--
Alan Gutierrez - 504 717 1428 - [EMAIL PROTECTED] - http://blogometer.com/
Think New Orleans - http://thinknola.com/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/