Rendy Rendy -4 years ago 260
Jade Question

1 line with 2 different class in Jade?

I have following code

td(class="fieldText") Others Please Specify

I want to put different style on
Please Specify

How am I able to do it in 1 line?

Answer Source

You can use the <span> element to do that:

.fieldText {

.otherText {


td(class="fieldText") Others 
  span(class="otherText") Please Specify

which outputs as:

<td class="fieldText">Others <span class="otherText">Please Specify</span></td>

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