The problem with .append is that I must write all in one line like so:
$('#addr' + (i - 1)).append("<td>" + i + "</td><td><input id='riferimento_" + i + "' name='riferimento_" + i + "' type='text' placeholder='RIFERIMENTO' class='form-control riferimento' /></td><td><input id='host_" + i + "' name='host_" + i + "' type='text' placeholder='HOST' class='form-control host' /></td><td><input id='user_" + i + "' name='user_" + i + "' type='text' placeholder='USER' class='form-control user' /></td><td><div class='opzioni' id='opzione" + i + "'> <p id='infotime_" + i + "' class='pull-left'><p> <a href='#' id='" + i + "' class='btn btn-danger btn-circle pull-right btn_delete_row'> <span class='glyphicon glyphicon-trash'></a> <a style='margin-right: 8px;' href='#' data-popup-open='popup_" + i + "' class='btn btn-info btn-circle pull-right more_info '><span class='glyphicon glyphicon-info-sign'></span></a> <a hidden style='margin-right: 8px;' href='#' key='" + i + "' id='update_row_db_" + i + "' class='btn btn-primary btn-circle pull-right update_row_db '><span class='glyphicon glyphicon-pencil'></span></a> <a hidden style='margin-right: 8px;' href='#' key='" + i + "' id='add_row_db_" + i + "' class='btn btn-success btn-circle pull-right add_row_db '><span class='glyphicon glyphicon-save'></span></a> </div></td>");
how can i use breaklines and format the html like this:
$('#addr'+(i-1)).append("
<div>
<p></p>
</div>
");
I'd like to have a code more readable for further changes. Maybe I'm looking at the problem in the wrong way, do you know another way?