Advertisement
Guest User

Untitled

a guest
May 10th, 2016
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  $.get('../php/search/search.php', {query: query}, function(info) {
  2.              for (var key in info) {
  3.   konteineris.append(
  4.  
  5.             " <div class='message'> " +
  6.       "  <div class='upper-message'> " +
  7.           "  <span class='author'>" + info['autorius'] + "</span>" +
  8.            " <span class='date'>" + info['data'] +"</span>" +
  9.            " <span class='cat'>" + info['category'] + "</span> " +      
  10.        " <div class='main-part'> " +            
  11.           "<nl2br(value['main_info'])" +
  12.       "  </div>  " +
  13.  
  14.        " <div class='rating-part'> " +
  15.           "  <a href='javascript:;' class='upvote-button' onclick='upvoteButtonHandler(this);'> " +
  16.            " <span class='upvote-word'>Patinka</span> " +
  17.            " <span class='upvote-number'>" + info['upvotes'] + "</span> " +
  18.            " <span class='upvote-id'>" + info['id'] +"</span> " +
  19.  
  20.  
  21. "</a> + "  +
  22.        " </div> ");
  23.   }
  24. });
  25.  
  26.  
  27.  
  28. // JSON
  29.  
  30. {"0":{"id":"26","autorius":"asdadasdsa","main_info":"asdadasda","data":"2016-01-04","category":"anekdotai"
  31. ,"upvotes":"1","ip_adresas":"127.0.0.1","leidimas":"1"}}
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement