title: function not working on firefox
body: <p>I have this function that is supposed to remove a image when dragged to a div, but it is not working on firefox and I don't know why. and I have the following error message on the console "uncaught exception: Syntax error, unrecognized expression: #[object HTMLDivElement]"</p>
  
  <pre><code>$(function() {
     $('#img_garbage').droppable({
      drop: function(event, ui) {
          console.log(ui);
          $(ui.draggable).remove();
  
          if (event.srcElement == undefined){
          var dragged = event.target;
          }
          else {
  
          dragged = event.srcElement.alt}
          console.log(dragged);
          deleteCookie(dragged);
  
          $("#"+dragged).remove();
  
      }
     });
  });
  </code></pre>