Skip to content

Instantly share code, notes, and snippets.

@chintanparikh
Created March 7, 2013 17:22
Show Gist options
  • Save chintanparikh/5109888 to your computer and use it in GitHub Desktop.
Save chintanparikh/5109888 to your computer and use it in GitHub Desktop.
MeteorJS
Template.new.events = {
'keyup #new-item': function (e) {
if (e === 13)
{
var new_item = $("#new-item").val();
Items.insert({name: new_item});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment