title: Jquery containment problem with Image rotation
body: <p>HI All.
         I am using the below code to rotate the drag/dropped image.The rotation is working fine,but when i start rotating ,the image moves outside the "div" container .Anything i am missing.</p>
  
  <pre><code>    //Moving outside the container for first time.After dragging inside the div,then rotates inside the div
    var test = 5;
    var mouseDown = false;
    $(function() {
        $('.frame').mousedown(function(e) { mouseDown = true; });
        $('.frame').mouseup(function(e) { mouseDown = false; });
        $('.frame .rotatable').live('mousemove', function(e) {
            if ((mouseDown) &amp;&amp; (e.ctrlKey)) {
  
                test = test + 10;
                var currentId;
                document.getElementById('angle').value = test;
                $(this).rotate({ angle: test });
                var currentId = $(this).attr('id');
                var id = currentId.substring(8);                  
                var deleteimage = 0;
                var angle = test;
                saveCoords(e.clientX, e.clientY, angle, id, document.getElementById("&lt;%=trafficID.ClientID%&gt;").value, deleteimage);
            }
            $('#frame .rotatable').draggable({ containment: 'parent' });
  
        });
    });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="frame" class="frame" runat="server"  style="width:550px; height:400px;background-position:bottom; border:1px solid #000;"&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks,</p>