Created
June 18, 2014 02:30
-
-
Save gingerrific/a1ad5b39f448f843e65f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var comment = $('.imageComment').val(); | |
//takes the value of the comment field and clears it | |
$('.imageComment').val(''); | |
var url = $('.imageURL').val(); | |
$('.imageURL').val(''); | |
//creates a new instance of the constructor POST passing the three assigned variables | |
var outgoingPost = new Post(); | |
outgoingPost.set({ | |
'URL' : $('.imageURL').val(), | |
'Comment' : $('.imageComment').val() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you're capturing a value and assigning it to url and comment respectively. however, within the 'set' you're assigning them to the values....that you just cleared out. so instead it should be