Piddien Piddien - 1 year ago 127
Jade Question

Jade (node.js) - more than one class on an element?

in jade one can write:


and it compiles into:

<div class="container"></div>

But what if you have several classes like:

<div class="span 4"><div>

I have written it like this:

div(class="span 4")

But I am thinking: Is there not a better way of doing it in jade?

Answer Source

From the documentation:

how about some classes?


renders <div class="user-details"></div>

multiple classes? and an id? sure:

renders <div id="foo" class="bar baz"></div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download