title: Append img from AJAX
body: <p>I'm trying <code>append</code> <code>&lt;img&gt;</code> to a <code>div</code> using Ajax (because I need to fetch the name of image from database).</p>
  
  <p>I already get the <code>&lt;img&gt;</code> tag on my <code>div</code>, also get the <code>src</code> attribute to the correct image. But I'm still not seeing the image. I'm just seeing a <code>&lt;img&gt;</code> tag with 0 x 0 size. Try to enlarge the size, still see nothing..</p>
  
  <p>I try to open image via link that generated inside <code>src</code> attribute, and I can see the image that I want to append..
  Why this is happen ?</p>
  
  <p>This is my code</p>
  
  <p>Trigger to function that contain ajax</p>
  
  <pre><code>&lt;div class="HotelListDescriptionContent" onclick='showDetailRoom("&lt;?php echo $arrayroomssearch[$arrk]['room_code']?&gt;")'&gt;
  </code></pre>
  
  <p>Function With Ajax</p>
  
  <pre><code>function showDetailRoom(roomid)
  {
      if(j("#detailroom"+roomid).is(":visible"))
          j("#detailroom"+roomid).hide();
      else
      {
          j.post("inc/querys/roomdetail.php",
          { 
              roomid : roomid,
          },
          function(data){
              // console.log(data);
              j("#detailroom"+roomid).html("");
              // j("#detailroom"+roomid).append($("&lt;option&gt;&lt;/option&gt;").append("Select your state..."));
              if(data == "empty")
              {
                  j("#detailroom"+roomid).append($("&lt;option&gt;&lt;/option&gt;").append("State Not Found..."));
              }
              else
              {
                  j(data.photo).each(function(i,item){
                      // console.log(item);
                      j("#detailroom"+roomid).html("&lt;img scr='&lt;?php echo SITE_URL;?&gt;upload_photos/images/"+item+"'/&gt;");
                  })
              }
              j("#detailroom"+roomid).show();
          },
          "json");
      }
  }
  </code></pre>
  
  <p>Div target</p>
  
  <pre><code>&lt;div id="detailroom&lt;?php echo $arrayroomssearch[$arrk]['room_code'];?&gt;" style="display:none;"&gt;
  </code></pre>
  
  <p>Div target (via Inspect Element)</p>
  
  <pre><code>&lt;div id="detailroom20" style=""&gt;&lt;img scr="http://localhost/bookingbeol/bk-admin/upload_photos/images/kamar3-1476346812.jpg"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Div target not showing the image
  <a href="https://i.stack.imgur.com/mG9FD.png" rel="nofollow"><img src="https://i.stack.imgur.com/mG9FD.png" alt="enter image description here"></a></p>