title: How to remove the text of sortable area when item is dropped on it?
body: <p>I have the following code to perform sorting and drag and drop of the element. Here I am unable to remove "Drag and drop link here." from following <code>div</code> when item is dropped.  </p>
  
  <pre><code>&lt;div class="mega-menu-container sortable ui-sortable"&gt;
      Drag and drop link here.
  &lt;/div&gt;
  </code></pre>
  
  <p>When I run </p>
  
  <pre><code>stop: function(event, ui) {
      var item = $(ui.item);
      if ($sender !== "") {
          if ($(this).text().length &gt; 0) {
             $(this).text("");
          }
      }
  </code></pre>
  
  <p>on stop event, it will not add the dropped item.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var $receiver = "";
  var $sender = "";
  $(".sortable").sortable({
      start: function(event, ui) {
          $receiver = "";
          $sender = "";
      },
      connectWith: ".sortable",
      placeholder: "ui-state-hover",
      receive: function(event, ui) {
          $sender = ui.sender;
          $receiver = $(this);
          $receiver.text().replace("Drag and drop link here.", "");
      },
      stop: function(event, ui) {
          var item = $(ui.item);
          if ($sender !== "") {
              //if ($(this).text().length &gt; 0) {
              //    $(this).text("");
              //}
          }
      },
      cursor: "move"
  }).disableSelection();
  
  $(".menu-items&gt;.menu-item[data-type='link']").draggable({
      helper: "clone",
      connectToSortable: ".sortable",
      cursor: "move",
      start: function(event, ui) {
          $sender = $(this).parent();
      },
      revert: "invalid"
  });
  
  $(".menu-items&gt;.menu-item[data-type='container']").draggable({
      helper: "clone",
      connectToSortable: ".sortable&gt;[data-level='1']",
      placeholder: "ui-state-hover",
      cursor: "move",
      start: function(event, ui) {
          $sender = $(this).parent();
      },
      revert: "invalid"
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.menu-items &gt; .menu-item {
      margin: 0 15px;
      padding: 15px;
      min-height: 30px;
  }
  
  .sortable {
      border: dashed 1px rgba(9, 9, 9, 0.3);
      padding: 20px !important;
  }
  
  .menu-item {
      background: #fff;
      -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
      color: rgba(0, 0, 0, 0.65);
      border: 1px solid #ccc !important;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;div class="menu-items" style="widht:30%;"&gt;
      &lt;div class="menu-item" data-type="link" style="float: left;widht:40%;"&gt;
          &lt;i class="fa fa-arrows" aria-hidden="true"&gt;&lt;/i&gt;
          &lt;div class="title"&gt;Link&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="menu-item ui-draggable" data-type="container" style="float: left;widht:40%;"&gt;
          &lt;i class="fa fa-arrows" aria-hidden="true"&gt;&lt;/i&gt;
          &lt;div class="title"&gt;Container&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div style="clear:both;"&gt;&lt;/div&gt;
  &lt;div class="mega-menu-container sortable ui-sortable"&gt;
      Drag and drop link here.
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>