Hi Tim,

Thats exactly what I am doing and thats exactly what I am posting about.

Looking at Jade's loop documentation, all it shows is "each" yet I see
people mentioning using for loop iterations yet it is not in the jade
docs. So here I am, asking the question. :)

B.

On Thu, Aug 16, 2012 at 1:18 PM, Tim Caswell <[email protected]> wrote:
> It depends on what you're doing.  If you're writing an http web server
> and want to serve generated html using jade in node, then use jade's
> loop constructs to generate the appropriate html.
>
> On Thu, Aug 16, 2012 at 12:13 PM, Bob Wohl <[email protected]> wrote:
>> Hello all,
>>
>> I'm new to Jade and NodeJs but have been able to wiggle some
>> interaction. So far it doesn't seem to tough but I still lack the know
>> how on a lot of this stuff. :)
>>
>> I'm attempting to create a grid via values set by user input using
>> jade. I have values of height and width (4x4 for example) which I am
>> attempting to draw via a for loop, something like this:
>>
>>
>> for (var i = 0; i < theheight; i++){
>>    for(var j = 0; j < thewidth; j++){
>>        //draw divs and possition
>>    }
>> }
>>
>> How would you write this in Jade? Or, how would you do this in node
>> and tell it to render? I still need to style/position/etc each one of
>> these. What is the best way to do this?
>>
>> It would be cool if there was some sort of OOP to it where I can
>> create each div as its own display object with properties but I'm
>> probably asking for a bit much there. ;)
>>
>> Thanks in advance and sorry if this is super noob.
>>
>> Bob
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to