Skip to content

Instantly share code, notes, and snippets.

@leopic
Created May 3, 2014 17:14
Show Gist options
  • Save leopic/9ad21cf0adb7c9406f7e to your computer and use it in GitHub Desktop.
Save leopic/9ad21cf0adb7c9406f7e to your computer and use it in GitHub Desktop.
Code Academy Parse Excercise 4
$(window).on("html_loaded", function(e) {
$(".submit_button").click(function(e) {
// 1. Create a "Comment" subclass of Parse.Object
var Comment = Parse.Object.extend('Comment');
// 2. Create a new instance of this subclass
var myComment = new Comment();
// 3. Add some data to the "text" and "likes" keys
myComment.set('text', '3 lot of th1ngs!');
myComment.set('likes', new Date().valueOf()*Math.PI);
// 4. Save your new comment!
myComment.save();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment