function createLabelItem(data) { if (data.color == "") { data.color = "#000000"; } $("#foldersContainer").find("ul").append( $("
  • ").append( " " + "
    " + "
    " + data.title + "
    " + "
    " ) ) } function fetchLabels(options) { jQuery.ajax("c/restful/labels/", { async:false, dataType:'json', type:'GET', success:function (data) { if (options.postUpdate) { options.postUpdate(data) } }, error:function (jqXHR, textStatus, errorThrown) { $('#messagesPanel div').text(errorThrown).parent().show(); } }); }