title: Set variable on drop using jquery draggable/droppable
body: <p>I am working on a proof of concept that makes use of the jquery ui draggable/droppable.</p>
  
  <p>I am looking for a way to set a variable equal to the index of a div that is dropped into the droppable area. (Say I have divs named "div0", "div1", "div2", etc...)</p>
  
  <p>So imagine the code would look something like this:</p>
  
  <pre><code>&lt;div id="div0" class="draggableDiv"&gt;some cotent&lt;/div&gt;
  &lt;div id="div1" class="draggableDiv"&gt;more content&lt;/div&gt;
  &lt;div id="div2" class="draggableDiv"&gt;yet more content&lt;/div&gt;
  
  &lt;div class="droppableDiv"&gt;drop it here&lt;/div&gt;
  
  $(document).ready(function() {
      $('.draggableDiv').draggable({helper: 'clone'});
      $('.droppableDiv').droppable({
          accept: '.draggableRecipe',
          drop: function(ev, ui) { 
              ui.draggable.clone().fadeOut("fast", 
              function() { 
                  $(this).fadeIn("fast") 
              }).appendTo($(this).empty());
                          // function to set someVar = div[index];
          }
      });
  });
  </code></pre>
  
  <p>I am not sure how best to accomplish this, so if anyone has any suggestions, I'd appreciate some guidance.</p>
  
  <p>Thanks!</p>