I'm using jQuery's load function to load an error message if an ajax request fails into a div. I can see the div with the loaded contents in my source code but it's not showing up on the page. Any idea what's going on?
$(function() {
$(".submit").click(function() {
var element = $(this);
var id = element.attr('id');
var note = $('#note-' + id).val();
$('#message').show();
$.ajax({
type: "POST",
url: "/index.php/notes/new_note",
data: "id=" + id + "& note=" + note,
success: function() {
$('#notes-' + id).load('/index.php/ads #notes-' + id)
$('#note-' + id).val('')
}
});
$('#message').load('/index.php/ads #message')
return false;
});
});