It seems that the following code doesn't print anything, while, as you can see, it should. Basically there are no errors reported by Firebug.
var assign = {
'href' : {
'.voteUp' : '?p=action&a=voteup&pid='+ value.PostPID,
'.voteDown' : '?p=action&a=votedown&pid='+ value.PostPID,
'.postImage a': '?p=user&uid='+ value.UserUID
},
'src' : {
'.postImage img' : value.UserImage
},
'html' : {
'.repCount' : value.PostRep,
'.postInfo .rep': value.UserRep,
'.postInfo .name': value.UserName,
'.postInfo .time': value.PostTime,
'.postMessage' : value.PostText
}
};
$.each(assign, function(type, data) {
switch (type)
{
case 'html':
$.each(data, function(handler, value) {
$('#'+ value.PostPID +' '+ handler).html(value);
});
break;
case 'href':
case 'src':
$.each(data, function(handler, value) {
$('#'+ value.PostPID +' '+ handler).attr(type, value);
});
break;
}
});
This is part of other code, but the rest of the script works well (for example, after this code there is a function that fadeIn the contents). If you cannot find anything bad here, please comment above and i'll add the entire script.
Thanks.