Hi Alan!
Thus, jQuery can take the controller centric model and make it lot
more powerful.
It would be really great if you could put an example showing what you
described here. Something to click trough to see it in action.
--
Jörn Zaefferer
http://bassistance.de
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)
Hi,
// imagine yourself some code in these functions.
[...]
Event.observe($(#switch), 'click', switchViews)
I like that. In jQuery-style it could be something like this:
jQuery('#switch').bind('click',function() {
var showme = jQuery.treeView('#mytree');
var hideme =
Hi,
Controller set of methods is returned..
$('#grid').grid().data(data).drig().show()
$('#grid').grid().scrollToRow(6).drig().css(border, 1px)
A controller object is returned..
var grid = null
$(grid).grid({
data: data,
onComplete: function(controller) { grid = controller }
On 01/12/06, Christof Donat [EMAIL PROTECTED] wrote:
Hi,
Controller set of methods is returned..
$('#grid').grid().data(data).drig().show()
$('#grid').grid().scrollToRow(6).drig().css(border, 1px)
A controller object is returned..
var grid = null
$(grid).grid({
data:
Hi,
$('#grid').grid({data:data}).show().gridController().scrollToRow(6);
An perhaps have a method that returns you back to jQuery object?
Calling it 'end' (or any other jQuery method name) may be confusing,
something like 'endGrid'.
I don't think that is necessary. You could compare it to
Heh, I should have read this first, before suggesting it myself. *blush*
- Brian
On 01/12/06, Christof Donat [EMAIL PROTECTED] wrote:
Hi,
Controller set of methods is returned..
$('#grid').grid().data(data).drig().show()
$('#grid').grid().scrollToRow(6).drig().css(border, 1px)
A
On 01/12/06, Brandon Aaron [EMAIL PROTECTED] wrote:
If this type of functionality starts to be
required I would suggest including a standard way for plugins to
easily restore state (.end()) in the core. Destructive methods will be
no more in 1.1, so I don't think .end() will be around either.
I'm fond of the elegance of chaining for manipulating the DOM.
The chaining methods of jQuery operate on a set of items and as
someone who's landed and getting used to the library and it's idioms
the ability to act on all the elements that match a pattern
accurately models how I view markup.
* Brandon Aaron [EMAIL PROTECTED] [2006-12-01 10:16]:
On 12/1/06, Sam Collett [EMAIL PROTECTED] wrote:
An perhaps have a method that returns you back to jQuery object?
Calling it 'end' (or any other jQuery method name) may be confusing,
something like 'endGrid'.
I don't think using
* Brian Miller [EMAIL PROTECTED] [2006-12-01 09:05]:
Hi,
Controller set of methods is returned..
$('#grid').grid().data(data).drig().show()
$('#grid').grid().scrollToRow(6).drig().css(border, 1px)
A controller object is returned..
var grid = null
$(grid).grid({
data:
* Christof Donat [EMAIL PROTECTED] [2006-12-01 05:28]:
Hi,
$('#grid').grid({data:data}).show().gridController().scrollToRow(6);
An perhaps have a method that returns you back to jQuery object?
Calling it 'end' (or any other jQuery method name) may be confusing,
something like
Alan Gutierrez schrieb:
A controller object is returned..
var grid = null
$(grid).grid({
data: data,
onComplete: function(controller) { grid = controller }
})
grid.srollToRow(6)
I favor that approach, modified:
var gridControl = $(#grid).grid(data);
* Jörn Zaefferer [EMAIL PROTECTED] [2006-11-30 16:12]:
Alan Gutierrez schrieb:
A controller object is returned..
var grid = null
$(grid).grid({
data: data,
onComplete: function(controller) { grid = controller }
})
grid.srollToRow(6)
I favor that approach, modified:
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)
Uh, drig()? So if I want to return to I was before scrollToRow(6), should I
use (6)woRoTllorsc? ;-)
I don't know
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
Remember not everything needs to look like jQuery.
Or does it?
On 11/30/06, Stephen Howard [EMAIL PROTECTED] wrote:
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(
only when it's better stated in jquery! which is always!
On 11/30/06, Matt Stith [EMAIL PROTECTED] wrote:
Remember not everything needs to look like jQuery.
Or does it?
On 11/30/06, Stephen Howard [EMAIL PROTECTED] wrote:
I know we're all fond of the elegance of chaining, but would it be
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
19 matches
Mail list logo