Prev Home Next

9 Observable collection changes: JsViews

HTML:

...	
	<td data-getfrom="[firstName]" />
	<td>
		<input data-getfrom="[firstName]" data-to="[firstName]" />
	</td>
...

Script:

$( "#details" ).link( person, "#personTmpl" );

// Observable array change
$( "#insertPerson" ).click( function() {
	$.observable( people ).insert( 0, { firstName: "NewPerson" });
});