I have a div that is generated html via Expression Engine. I\'m using ajax submit:
$(\'#login-form\').ajaxForm({
// success identifies the function to
And for your pretty fade in
success : function(data) {
$("#panel").hide().html(data).fadeIn('fast');
}
I assume you looking for something like that:
$('#login-form').ajaxForm({
success: function( data) {
$("#panel").html( data);//Will insert new content inside div element.
}
});
FIX:
$('#login-form').ajaxForm({
target: '#panel', //Will update the "#panel"
success: function( data) {
alert( "Success");
}
});
Pretty much any of the methods listed in jQuery's "manipulation" section are going to do what you want: http://docs.jquery.com/Manipulation