I've used code from here jquery prepend + fadeIn
Without fadeIn
it works
function updateResult(data) {
$('#test').prepend(
html
);
}
But with fadeIn
works only when data contains one div
tag,
$('#test').prepend(
$(html).hide().fadeIn('slow')
);
otherwise FireFox returns error
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://code.jquery.com/jquery-latest.min.js :: <TOP_LEVEL> :: line 16" data: no]
How it possible rewrite this code?
Upd. In my situation I've solved it this way
data = data.replace(/(?:(?:\r\n|\r|\n)\s*)/gi, '');
$(data).hide().prependTo('#test').fadeIn('slow');
After removing line breaks works as should