Skip to content

Instantly share code, notes, and snippets.

@matarillo
Created October 24, 2009 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matarillo/217324 to your computer and use it in GitHub Desktop.
Save matarillo/217324 to your computer and use it in GitHub Desktop.
var view = {
update: function() {
var t = model.text;
$('#label').text(t);
var p = model.position;
$('#lame').animate(
{left: p.x, top: p.y},
{duration: 'slow', complete: function(){controller.next()}}
);
}
};
window.onload = function() {
model.observers.push(view);
$('#button1').click(function(){controller.click()});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment