I am trying to create div which are draggable as well as resizable. Now, if I hardcode one div at design time, it works. However, if I add divs at run time, draggable does not work.
/*----------------------*/
. movingDiv { 
    border: 1px solid;
    width: 150px; 
    height: 150px; 
    padding: 0.5em; 
    resize: both;
    overflow: auto;
    position: absolute;
}
/*-----------------*/
.........
.........
 <div id="source">
</div>
<div id="container">    
<div class="movingDiv">
    <p>Drag and resize</p>
</div>
</div>
</body>
<script>
  $("#source").click(function () {
      $("#container").append('<div class="movingDiv"></div>');
    });
  $(".movingDiv").resizable().draggable();
</script>
 
     
     
    