[jQuery] Callback function - display on page
Hey all! I have been trying to say add a call back function after the
form has been submitted, display on the page word has been added, have
it appear for a second or so and then fade away..Any ideas on that? My
code:
$(document).ready(function(){
$('#addWord').submit(function(){
$.ajax({
type: "POST",
url: "add.php",
data: {"word": $('#word').val()}
})
$('#wordBank').load('words.php', '', function(){ $('.word',
this).draggable() });
return false;
})
$('#wordBank').load('words.php', '', function(){ $('.word',
this).draggable() })
});
Would I use ajax.success? I have been trying to check out some
different ideas, but am stuck on this. I am stumped. Thanks so much.