Rendy Rendy - 10 months ago 68
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>