If I have a moustache attribute say `{{stockvalue}}` and I would like different classes in the surrounding div based on the value of `{{stockvalue}}`say:

```
<div class="label-success">{{stockvalue}}</div>

```

if over 0 and

```
<div class="label">{{stockvalue}}</div>

```

if 0

EDIT 10-NOV-2016

You have both submitted some great solutions as far as I understand, my problem however is that I am using it together with the Algolia instant search system.

```
function app(opts) {
  var search = instantsearch({
      appId: opts.appId,
      apiKey: opts.apiKey,
      indexName: opts.indexName,
      urlSync: true,
      searchFunction: function(helper) {
          var searchResults = $('.search-results');

          helper.search();
          searchResults.show();
      }
  });

  search.addWidget(
    instantsearch.widgets.searchBox({
      container: '#search-input',
      placeholder: 'Hvad søger du efter?'
    })
  );

  search.addWidget(
    instantsearch.widgets.hits({
        container: '#hits',
        hitsPerPage: 5,
        templates: {
            item: getTemplate('hit'),
            empty: getTemplate('no-results')
      }
    })
  );

  search.addWidget(
    instantsearch.widgets.stats({
      container: '#stats'
    })
  );

  search.addWidget(
    instantsearch.widgets.sortBySelector({
      container: '#sort-by',
      autoHideContainer: true,
      indices: [{
        name: opts.indexName, label: 'Relevans'
      }, {
        name: 'price_asc', label: 'Laveste pris'
      }, {
        name: 'price_desc', label: 'Højeste pris'
      }]
    })
  );

  search.addWidget(
    instantsearch.widgets.pagination({
      container: '#pagination',
      scrollTo: '#search-input'
    })
  );

  search.addWidget(
    instantsearch.widgets.refinementList({
      container: '#category',
      attributeName: 'primary-cat',
      showMore: true,
      showMore: { limit: 30, templates: { active: 'Vis mindre', inactive: 'Vis mere' } },
      sortBy: ['isRefined', 'count:desc', 'name:asc'],
        operator: 'or',
        limit: 10,
      templates: {
        header: getHeader('Kategorier')
      }
    })
  );

/*  search.addWidget(
    instantsearch.widgets.refinementList({
      container: '#brand',
      attributeName: 'brand',
      sortBy: ['isRefined', 'count:desc', 'name:asc'],
      limit: 10,
      operator: 'or',
      templates: {
        header: getHeader('Brand')
      }
    })
  );
*/
  search.addWidget(
    instantsearch.widgets.rangeSlider({
      container: '#price',
      attributeName: 'price',
      templates: {
          header: getHeader('Pris')
      },
      step: 10,
      max: 5000
    })
  );

```

This javascript extracts the stockvalue data and applies it onto the html, but I see no way to do any logic on the stockvalue variable as it is never present in this javascript.