title: jQuery removeClass not working with draggable
body: <p>so I'm trying to make a schedule table where lectures can be dragged from a cell to another, unless the new cell already has a lecture, in this case dragging will be rejected. I'm trying to do this by adding and removing class 'has_lecture' from the cell to indicate if it should allow moving cells into or not.
  Here is my code.. but for some reason the remove class doesn't work.</p>
  <pre><code>$(&quot;.draggable&quot;).draggable({
              revert: 'invalid'
          });
  
          $(&quot;.droppable&quot;).droppable({
              accept: function () {
                  return (!$(this).hasClass('has_lecture'))
              },
              drop: function (event, ui) {
                  var $this = $(this);
                  ui.draggable.position({
                      my: &quot;center&quot;,
                      at: &quot;center&quot;,
                      of: $this,
                      using: function (pos) {
                          $(this).animate(pos, 200, &quot;linear&quot;);
                      }
                  });
                  $(this).addClass('has_lecture')
  
              },
              out: function () {
                      // this line doesn't work
                      $(this).removeClass('has_lecture')
              }
          });
  </code></pre>