title: Jquery ajax method success data
body: <p>Ajax method for a search system.</p>
  
  <pre><code>function PostForm()
  {
      $.ajax({
      type: "POST",
      url : "assets/server.php",
      data : $("#frm").serialize(),
      success : function(data)
      {
          console.log(data);
      var data = data.split("||");
      $(".firstinfo").html(data[0]);
      $(".secondinfo").html(data[1]);
  
      }
   },"json");
  }
  </code></pre>
  
  <p>I am working with this piece of code. But i can't figure out what these three lines are actually doing. </p>
  
  <pre><code>var data = data.split("||");
      $(".firstinfo").html(data[0]);
      $(".secondinfo").html(data[1]);
  </code></pre>
  
  <p>why it splits with pipe sign? I guess success method returns an array and it shows data in firstinfo, secondinfo divs. I am working with a search system actually. Please can anyone explain me the above mentioned codes with the points i mentioned?</p>