function myJsonCategory(Qcategory, div, addTagCategory) { FONTE.dbHandler.executeSql("SELECT DISTINCT * FROM xm24_posts WHERE category = ? ORDER BY date COLLATE NOCASE DESC;", [Qcategory], function (resultSet) { var items = []; for (var i = 0; i < resultSet.rows.length; i++) { var val = JSON.parse(resultSet.rows.item(i).post); var id = val.id; var date = val.date; var title = val.title.rendered; var url = val.guid.rendered; var cleanTime = EVENTS.formatDate(date, EVENTS.dateFormat.display.date); var tag = ''; var cattag = ''; /* if (addTagCategory) { $.each(val.tags, function (index, value) { if (value == 43) { } if (value == 36) { } }); //key mi dice l'indice' items.push("
  • " + title + "
    " + cleanTime + "" + tag + "|
  • "); } else {*/ items.push(getLiPost(id, title, cleanTime)); } $("