Your content is being added by mustache after run-time, and since your handlers are bound at run-time, they have no idea what to bind to. The correct way is to use .on
and bind the click event to the container of your appended content.
$(document).on("click", "h2", vara);