Thanks Michael, good to know, I guess I should be reading more of
y'all's code.  I got into the habit of putting my () on different
lines due to long nested functions.

Piotr:
Is your goal with this to enable users to create their own mock DOM
tree, name each node to match an element in the tree, convert their px
sizes to em, and save the structure for updating later?  Which would
be why you want many nodes, to emulate an existing DOM tree
somewhere....?  So it helps promote accessiblity? Hmm... I'm trying to
solve this 'riddle'.

Charles

On Sep 7, 10:47 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > > From: polyrhythmic
> > > Also, I don't recommend splitting your .'s... jQuery code is more
> > > often written like so:
>
> > > $(obj).fn({
> > > //function code here
> > >  }).fn2(options).fn3();
>
> > > Not splitting your ) and . makes JSLint happy as well.  The first
> > > thing I did was run the code through JSLint and it won't process it
> > > even with "Tolerate sloppy line breaking"
> > > enabled.
> > From: Michael Geary
> > Well... The style that Piotr was using:
>
> >    $('#settings')
> >       .bind('submit', this.saveSettings)
> >       .find('[EMAIL PROTECTED]').bind('keyup', this, function(e) {
> >          ...
>
> > happens to be the style that John and I and a number of other
> > jQuery developers and users prefer. I think it is by far the
> > cleanest way to format chained methods.
>
> And just so there's no misunderstanding, if you prefer a different format, 
> that's cool. I just wouldn't go changing this if the only
> reason is to placate JSLint. JSLint can be a very useful tool, but it can be 
> overly fussy about a few things like this.
>
> -Mike

Reply via email to