Using .get() is it possible to read only the first line of a .txt file?
something like:
jQuery.get('file.txt', function(data) {
alert(data);
//process text file line by line
$('#div').html(data.replace('\n','<br>'));
});
but read only the first line?
Any other suggestion?
This might be a little faster than the version with
split, as it won’t split the wholedatastring, but instead it just searches for first newline.