title: Rails: get hoverover popup in form
body: <p>i am looking for implementing hoverover pop up function in the form. I got similar question with answer on stackoverflow. When i implemented it, it is not working. Here is the my code: </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id='user'&gt;&lt;%= f.label :product_code, "Product code", :id =&gt; "field2" %&gt;&lt;/div&gt;
  &lt;div id='popup'&gt;(Your name, product and city  initials without space. e.g. MHRRJP or MHRRJP etc for MoungHalwa by Rima Ravi Jain, Pune)&lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#popup {
  height: 50px;
  width: 200px;
  text-align: center;
  vertical-align:middle;
  background-color: cornflowerblue;
  color: white;
  display: none;
  padding-top: 8px;
  position: absolute;
  }
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$(document).ready(function() {
  $('#user').hover(function() {
      $('#popup').show();
  }, function() {
      $('#popup').hide();
  });
  });
  </code></pre>
  
  <p>This is not working. Can anybody tell where is the error?</p>