At the moment i'm trying to read .txt files which could contain ASCII arts and display them in my HTML document with JQuery. Simple text is displayed right but i have formatting problems with the arts.
How can i fix this ?
$(document).ready(function(e) {
$.get('/test/posts/header.txt', function(data) {
var lines = data.split('n');
for (var i = 0, len = lines.length; i < len; i++) {
$(".stream").append('<div class="line"><p class="header">' + lines[i] + '</p></div>');
}
});
});
Aucun commentaire:
Enregistrer un commentaire