backbone.jsunderscore.jsjst

Backbone JST template update without rendering again


I'm looking to update a template data without rendering the template again since I only need to change a number

<div class="l-col l-col-left float-l results-text">Showing {{= data.showingNow }} out of {{= data.numOfResults }} results </div>

This code is part of a template and I would like to update "data.showingNow" without rendering the template again since only small part need's an update

Can it be done?


Solution

  • You can always use :

    $('.results-text').html(/* your new html here */)