Created
May 3, 2014 17:14
-
-
Save leopic/9ad21cf0adb7c9406f7e to your computer and use it in GitHub Desktop.
Code Academy Parse Excercise 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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