Created
February 28, 2013 00:57
-
-
Save elbuo8/5053301 to your computer and use it in GitHub Desktop.
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
extends layout | |
block content | |
div#form | |
input#userID(type='text', name='user', placeholder='enter username') | |
br | |
textarea(type='textarea', name='text', placeholder='enter tweet', id='tweet') | |
br | |
button#submitTweet(type='button') Tweet | |
block script | |
script | |
$(document).ready(function() { | |
$('#submitTweet').on('click', function() { | |
console.log("Submitting"); | |
$.post('/submit', {user: $('#userID').val(), tweet:$('#tweet').val()}, function(result) { | |
$('#form').text(result); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment