title: how to draggable over one div to another div using jquery?
body: <p>I am trying to do small game like match the following using drag and drop using jquery.First i tried to move the droggable element to dropped place(Div) using below code,</p>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>#wrapper {
      width: 500px;
      border: 1px solid black;
      overflow: hidden; /* will contain if #first is longer than #second */
  }
  #first {
      width: 250px;
      float:left; /* add this */
      border: 1px solid red;
  }
  #second {
      border: 1px solid green;
      overflow: hidden; /* if you don't want #second to wrap below #first */
  }
  </code></pre>
  
  <p><strong>Index.jsp</strong></p>
  
  <pre><code>&lt;div align="center"&gt;
  &lt;div align="center" id="wrapper"&gt;
  &lt;div id="Questions"&gt;
  
  &lt;label id="Q1"&gt;Cat&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;label id="Q2"&gt;Cow&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;label id="Q3"&gt;Eagle&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;/div&gt;
  
  &lt;div id="Answers"&gt;
  
  &lt;label id="A1"&gt;Milk&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;label id="A2"&gt;Snake&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;label id="A3"&gt;Rat&lt;/label&gt;&lt;br&gt;&lt;br&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  
  
  
   &lt;script type="text/javascript"&gt;
  
  
       $(function(){
  
  
  
  $("#A1").draggable({
      revert: "invalid",
      snap: "#Questions"
      stack: "#A1",
  
      drop: function( event, ui ) {
  
           //here want to get draggable's id and droped element's id.
           // if(ui.draggable' id =='Q1' &amp;&amp; DropedElemnts's id =='A1'){ alert("Matched") }
  
        }
  });
  $("#A2").draggable({
      revert: "invalid"
      snap: "#Questions"
      stack: "#A2"
  });
  $("#A3").draggable({
      revert: "invalid"
      snap: "#Questions"
      stack: "#A3"
  });
  
  
  });
  
  
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>When i drag Answer div's element over Question div, its disappearing. How to fix this?</p>
  
  <p>What I am trying is ,if i drag <strong>Rat</strong> and dropped on <strong>Cat</strong> means its should say matched.</p>
  
  <p>How to get Dragging elements id value and on dropped elements id value?</p>