Ok, So I have over 1000 lines of jQuery code, and other functions are also using appendTo and it works.
However it seems that the following function appendTo wont work, while append does work.
I think it is because I am creating the DIV in the jquery file and the asking another function to fill that div. but am not sure if that is the reason.
here is the function that is playing up.
function getmessage(e) {
$('#loadmessage').html("");
$.getJSON('sys/classes/usermessage.php?task=fetch&subkey=' + e + '&userid=' + sessionparts[1], function(getmessage) {
// get line status
$.each(getmessage, function(i, item) {
$('#loadmessage').append(item.subkey);
});
});
};