What is the best way to build a div with jQuery Example:
$(document).ready(function(){
$.ajax({
type:'post',
dataType: 'json',
url: 'listAllForum',
success: function(dados){
for(var i = 0; dados.length > i; i++){
$('#post-forum').append('<strong>Usuario Fulano de Tal</strong> - Data: 00/00 <br>' +
dados[i].idForum + ' - '+ dados[i].message + '<br> <br>');
}
}
});
});
For example: I want each message to have a different color for easy reading. The user name puts the tags to give a highlight, but is it okay to do this within the ajax for? If I want to put a link to redirect to a @RequestMapping, where would I place the href?