Skip to content

Commit

Permalink
Updates to examples/helloworld_example: Added package.json; Improved JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrienstra committed Feb 17, 2012
1 parent f782ebf commit ec78b9e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
11 changes: 9 additions & 2 deletions examples/helloworld_example/helloworld.html
Expand Up @@ -16,9 +16,16 @@
$("#text-input").val("");
});


$("#text-input").keypress(function (e) {
if (e.which && e.which === 13) {
$("#send-button").click();
return false;
}
});

now.name = prompt("What's your name?", "");


$("#text-input").focus();
});
</script>
</head>
Expand Down
16 changes: 16 additions & 0 deletions examples/helloworld_example/package.json
@@ -0,0 +1,16 @@
{
"name": "nowjs-helloworld-example",
"version": "0.0.6",
"author": "ericz (Eric Zhang) <eric@nowjs.com>",
"description": "'Hello world' example for NowJS.",
"keywords": [
"nowjs",
"example"
],
"dependencies" : {
"now" : ">=0.7"
},
"engine": {
"node": ">=0.4"
}
}

0 comments on commit ec78b9e

Please sign in to comment.