title: Drop elements inside iframe only else revert
body: <p>EDIT:1</p>
  
  <p>This is drag.html (main page) - </p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title&gt;jQuery UI Sortable - Handle empty lists&lt;/title&gt;
  &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" /&gt;
  &lt;style&gt;
  .drag {padding:10px;border:1px solid blue;margin:20px;}
  &lt;/style&gt;
  &lt;script&gt;
  $(function() {
  
      $( ".drag" ).draggable({ helper: "clone",iframeFix: true, revert : 'invalid',cursor: "move"});
  
  $('#frame').load(function(){
      $('#frame').contents().find('#sortable3').droppable({
          accept: ".drag",
          drop: function( event, ui ) {
              var html = '&lt;div class="droptrue"&gt;'+ ui.draggable.html() + '&lt;/div&gt;';
              //alert(html);
              $(this).append(html);   
          }
      });
  
  });
  
  
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div class="drag" style="display:inline"&gt;
      Drag 1
  &lt;/div&gt;
  &lt;div class="drag " style="display:inline"&gt;
      Drag 2
  &lt;/div&gt;
  &lt;div class="drag " style="display:inline"&gt;
      Drag 3
  &lt;/div&gt;
  &lt;div class="drag " style="display:inline"&gt;
      Drag 4
  &lt;/div&gt;
  
  &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
  
  &lt;iframe id="frame" src="iframe.html" width="700" height="400"&gt;&lt;/iframe&gt;
  
  
  &lt;br style="clear: both;" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is the iframe code -</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title&gt;jQuery UI Sortable - Handle empty lists&lt;/title&gt;
  &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" /&gt;
  &lt;style&gt;
  .droptrue {padding:5px;margin:5px 0px;border:1px solid green;}
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;script&gt;
  
  $(function() {
  
      $( "#sortable3" ).sortable({
          placeholder: "ui-state-highlight"
      });
  
      $( ".droptrue" ).disableSelection();
  });
  
  &lt;/script&gt;
  &lt;body&gt;
  
  &lt;div id="sortable3" style="width:500px;height:300px;border:1px solid red;"&gt;
  
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And I know without iframe I can achieve that easily as done over <a href="http://dharmeshdhakan.com/examples/no_iframe.html" rel="nofollow">here</a>
  But for my current project I cannot eliminate iframes. So, please help me.</p>
  
  <p>Check the demo <a href="http://dharmeshdhakan.com/examples/drag.html" rel="nofollow">here</a></p>
  
  <p>The red box is inside an iframe and if you drag and drop elements just inside the red box if works fine.But if you drop them at the bottom of the box it reverts back.</p>
  
  <p>Also, if you drop the dragbox nearby the iframe(just above iframe) also it gets successfully dropped.</p>
  
  <p>What I want is that the dragbox should be dropped only if its inside the red box else revert back.</p>
  
  <p>Check <a href="http://dharmeshdhakan.com/examples/no_iframe.html" rel="nofollow">this</a></p>
  
  <p>When using iframe there is problem with the droppable area but couldnt find the solution.</p>
  
  <p>Thanks in advance!</p>