Question about droppable events

Question about droppable events

I'm using the draggable/droppable functionality, but there's something I can't figure out. How do I detect which element was dropped into the same container and attach an event to it?

This is what I'm looking for... See comments in the "if" statements:


$(function() {
              
    $( "#mybox, #mysquare" ).draggable({ revert: true });
   
    $( ".container" ).droppable({
        accept: "#mybox, #mysquare",
        activeClass: "activeelement",
        hoverClass: "hoverelement",
        drop: function( event, ui ) {
          
     // if "mybox" was dropped {
      do something here
      }

      // if "mysquare" was dropped {
      do something here
      }

            }
        });
    });