title: Jquery text and form submit on click inside a specific div class
body: <p>I have a php <code>foreach</code> that generates divs with class <code>.like-button1,2,3,4..</code> and generate more forms <code>form1,2,3,4..</code>. </p>
  
  <p>The goal is that when users click on "like" the div shows the text message:</p>
  
  <p>"You like: www.facebook.com/ferrari" </p>
  
  <p>The script works correctly but the <code>.hover</code> function is not what I really want, because if you click on the first like in the <code>like-button1</code> div and you go on the second div, the text message appears on that second div.</p>
  
  <p>I can't find a right way to identify the right div, if you click the like inside div with class <code>like-button1</code> show text message and submit the form in that div, without possibly avoiding the script just hovering an other div.</p>
  
  <p>Thanks to all.</p>
  
  <pre><code>FB.Event.subscribe('edge.create', function (response) {
  
    $(".like-button1").hover(function() {                    
        $(".like-button1").text('Ti piace: ' + response);
        $("#form1").submit();
    });
  
    $(".like-button2").hover(function() {                    
        $(".like-button2").text('Ti piace: ' + response);
        $("#form2").submit();
    });
  
    $(".like-button3").hover(function() {                    
        $(".like-button3").text('Ti piace: ' + response);
        $("#form3").submit();
    });
  
  });
  </code></pre>