Skip to content

Instantly share code, notes, and snippets.

@nola
Created January 13, 2014 21:17
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 nola/8408356 to your computer and use it in GitHub Desktop.
Save nola/8408356 to your computer and use it in GitHub Desktop.
A Pen by Cyril Celestine.
<button>update</button>
<input type="text" value="10" /> <br />
<label></label>
$(function(){
var model = function(){
return {
prop: function () {
return $('input').val();
}
}
}();
$('button').click(function(){
$('label').text(model.prop)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment