Edit in JSFiddle

<script type="text/mustache" id="app-template">
    <h1>{{message}}</h1>
    <button id="change-value">Change message to "Goodbye, World"</button>
</script>

<!-- CanJS needs a place to put your application -->
<div id="my-app"></div>
// create an observable can.Map from the data
var data = new can.Map({message: "Hello World!"});

var frag = can.view("app-template", data);

//Load the DocumentFragment in the page
$("#my-app").html( frag );

$("#change-value").click(function(){
    data.attr("message", "Goodbye World!")
})