> > $('#exampleCA').append( [
> > '',
> > '',
> > '',
> > 'I was created by jQuery append',
> > '',
> > '',
> > ''
> > ].join('') );
> I do occasionally look at the source code, but I'm still new
> enough to JavaS
thank you guys, I really appreciate your comments and insight!
On Oct 1, 10:05 pm, howardk <[EMAIL PROTECTED]> wrote:
> I do occasionally look at the source code, but I'm still new enough to
> JavaScript that sometimes (even with 12 years of Java under my belt,
> and a whole slew of other languag
I do occasionally look at the source code, but I'm still new enough to
JavaScript that sometimes (even with 12 years of Java under my belt,
and a whole slew of other languages going back some 40 years) that
when I'm faced with new js constructs for the first time, about all I
can do is stare glass
I'd total agree with what Michael said. Infact HTML coding guidelines and
W3C Standards say that HTML quotes should be double "
Also as a PHP developer I tend to use single quotes ' for programming, but
that's because in PHP it doesn't use the parse engine looking for varibles,
but thats a differen
> From: James Dempster
>
> Much nicer to split the lines making it more readable.
>
> $(this).parent().append([
> "",
> " "x",
> ""
> ].join(""));
Also, once you're using .join, you don't have to use + inside it; you can
use comma for all your string concatenation. And t
I think this it what your trying todo...
$(this).parent().append(["", "x", ""].join(""));
Much nicer to split the lines making it more readable.
$(this).parent().append([
"",
"x",
""
].join(""));
hope this helps
On Oct 1, 5:29 pm, Matt <[EMAIL PROTECTED]> wrote:
> Hi everyone,
Hi everyone,
I have been using FlyDOM, and am trying to convert some of that code
to use the jQuery append, after reading what Mike wrote about better
performance. I am trying to dynamically insert some attributes.
However I'm getting a syntax error, so I think I'm not understanding
something simp
One of the greatest things about jQuery though is that the code is quite
easy to read and understand, so if unsure just check. If still unsure, then
what a great active community though the groups !
Love the tips, it might be quite nice if maybe the core could be changed to
accept an array (maybe
Glad you like the [].join('') trick, Howard - and good catch on the unnecessary
wrapper. You didn't miss anything, and that
simplifies the example down to:
$('#exampleCA').append( [
'',
'',
'',
'I was created by jQuery append',
'',
Nice use of join()! I'm new to JavaScript and jQuery both, and it's
nice to come across little snippets like this I can readily add to my
jQuery repetoire and that slightly expand my understanding of
JavaScript.
By the way, the docs show that it's legal to pass, as an argument to
append(), either
FWIW, I used FlyDOM and some like it and gave up on them, because:
1. syntax debugging made me cranky, compared to just writing HTML
2. it was noticably slower for more than just some small usages
3. I discovered this:
http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
With those (trim
Thanks Mike, that is nice to know. Ofcourse all that could go on one line
but I dont find it very readable and will be doing what you mentioned from
now on.
On 9/29/07, Michael Geary <[EMAIL PROTECTED]> wrote:
>
>
> > From: James Dempster
> >
> > I've never really understood the point to FlyDOM. I
> From: James Dempster
>
> I've never really understood the point to FlyDOM. It seems
> like a nice idea, but whats wrong with just using jQuery?
>
> FlyDOM
> $('#exampleCA').createAppend(
> 'table', { width: '718px', style: 'border: 2px inset #336699;' }, [
> 'tr', { className: 'ex
I've never really understood the point to FlyDOM. It seems like a nice
idea, but whats wrong with just using jQuery?
FlyDOM
$('#exampleCA').createAppend(
'table', { width: '718px', style: 'border: 2px inset #336699;' },
[
'tr', { className: 'exampleRow' }, [
'td', { align:
I suggest LiveQuery. Really easy to use. I haven't tried the other.
Also check out the FlyDOM plugin. Might be useful.
http://jquery.com/plugins/project/FlyDOM
Glen
On 9/29/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I've created code to dynamically add blocks of form elements to a
15 matches
Mail list logo