title: simplemodal with jquery ajax()
body: <p>I'm using a jquery ajax call to pull a file off my server and loading it into simplemodal for display. The input file is straight text with unix newlines "\n". I'm trying to convert the newlines to <br />, or append a <br /> to each line with no luck.</p>
  
  <p>I've displayed the file as I want with the alert() function, but it looks like alert() does this conversion for me.</p>
  
  <p>The modal displays the file - no problem. It's just not formatted the way I want. I've looked at many posts, and have tried a lot of things. </p>
  
  <p>Any help is great. Thanks in advance. Mike</p>
  
  <pre><code>function getLogFile(filename) {
      jQuery('div').remove('.logfile-class');
      var logdiv = $(document.createElement('&lt;div&gt;')).attr({'id': 'logfile-id', 'class': 'logfile-class'});
      $('body').append(logdiv);
  
      $.ajax({
              type: 'GET',
              url: "./logs/" + filename,
              dataType: "html",
              success: function(html) {
                      //alert(html);
                      html.replace(/\s$/g,"&lt;br /&gt;");
                      $('#logfile-id').append(html);
                      $('#logfile-id').modal();
              }
      });
  
      $('.logfile-class').hide();
  </code></pre>
  
  <p>}</p>