var thisTrolls = this;
var XHTML = "";
- data.trolls.each(function(trollData) {
+ data.trolls.each(function(i, trollData) {
var troll = new euphorik.Troll(trollData.content, trollData.author);
var trollId = trollData.troll_id;
thisTrolls.trolls[trollId] = troll;
-
+
XHTML +=
'<div id="troll' + trollId + '" class="troll">' +
'<span class="content">' + thisTrolls.formateur.traitementComplet(troll.content, troll.author) + '</span>' +