0

I was using this php line to make the magic happens :

$contents = array_reverse(explode("\n", $contents));

I was wondering how to do the same magic in jQuery.

This is the line without reverse :

function(){$('#myDiv').load('textfile.txt').fadeIn("slow");}

Thanks !

masteringtaiwan
  • 315
  • 1
  • 4
  • 9
  • I am sure someone else may post a clever way to do this in pure jQuery, but a simple solution would be just retrieve the value via AJAX from a PHP page. – user1477388 Jan 07 '14 at 21:09
  • I'm looking for the cleanest way. just to explode \n and reverse the order or even a cleaner method. – masteringtaiwan Jan 07 '14 at 21:13

0 Answers0