5

I have this variable in my mustache template called type, i want to capitalise the value of type using title case, is this possible ? taking into consideration that type is not what is displayed on the web page, it stores a value.

{{type}}

floormind
  • 1,868
  • 5
  • 31
  • 85
  • possible duplicate of [Mustache/jQuery/javascript - how to perform method on mustache variable?](http://stackoverflow.com/questions/8460720/mustache-jquery-javascript-how-to-perform-method-on-mustache-variable) – Drown Sep 18 '15 at 15:55
  • http://stackoverflow.com/questions/24202159/how-to-use-jquery-built-in-functions-in-mustache-template – Free-Minded Sep 18 '15 at 16:00

1 Answers1

1

You can wrap it in a span and use CSS.

CSS

.capitalize {
    text-transform: capitalize;
}

Template

<span class="capitalize">{{type}}</span>
Andy
  • 61,948
  • 13
  • 68
  • 95