function myJsonCategory(Qcategory, div, addTagCategory) { $.mobile.loading('show'); FONTE.dbHandler.executeSql("SELECT * 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 time = val.modified; var title = val.title.rendered; var url = val.guid.rendered; var splitTime = time.split("T"); var cleanTime = splitTime[0]; 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("
  • " + title + "
    " + cleanTime + "
  • "); } $("