title: how to find a parent?
body: <p>i have a problem with finding parent for form in this code:</p>
  
  <pre><code>&lt;li class="comment&lt;?php echo $comment[id]?&gt;"&gt;
      &lt;div class="comment-content"&gt;
          &lt;div class="comment-top"&gt;
              &lt;div class="comment-nme"&gt;
                      &lt;?php echo $comment[name]?&gt;
              &lt;/div&gt;
                  &lt;div class="comment-dt"&gt;
                      &lt;?php echo $comment[dt]?&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="comment"&gt;
              &lt;?php echo $comment[comment]?&gt;
          &lt;/div&gt;
          &lt;a class="reply" href="#comment&lt;?php echo $comment[id]?&gt;"&gt;Ответить&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="answer-form"&gt;
          &lt;form method="post"  name="answer-form" class="ans"&gt;
              &lt;textarea class="comment-textarea" name="comment"&gt;&lt;/textarea&gt;
              &lt;div class="a-comment-inputs"&gt;
                  &lt;input type="hidden" name="parent_id" value="&lt;?php echo $comment[id]?&gt;"&gt;
                  &lt;input type="hidden" name="status" value="new"&gt;
                  &lt;div class="a-comment-name"&gt;
                      Имя&lt;/br&gt;
                      &lt;input type="name" name="name" class="a-comment-name"&gt;
                  &lt;/div&gt;
                  &lt;div class="a-comment-email" &gt;
                      Eмейл&lt;/br&gt;
                      &lt;input type="email" class="a-comment-email" name="email"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="comment-apply"&gt;
                  &lt;button value="submit" onclick="return sendDataChild();" class="answer-but"&gt;Добавить&lt;/button&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  
      &lt;?php if($comment[childs]){ ?&gt;
  
          &lt;ul class="commentsRoot&lt;?php echo $comment[id]?&gt;"&gt;
               &lt;?php echo commentsString($comment[childs]) ?&gt;
          &lt;/ul&gt;
  
      &lt;?php } ?&gt;
  
  &lt;/li&gt;
  </code></pre>
  
  <p>i use this jQuery function:</p>
  
  <pre><code>function sendDataChild() {
      var form = $('FORM[name=answer-form]');
      var data = form.serialize();
      $.ajax({
          type: "POST",
          url: "req.php",
          dataType: "json",
          data: data,
          cache: false,
          success: function (data) {
              form[0].reset();
          },
          error: function (xhr, str) {
              alert('Возникла ошибка: ' + xhr.responseCode);
          }
          //$("#messageModalDialog").text(resultStat).show();
      });
      return false;
  };
  </code></pre>
  
  <p>but it select every form that find on button click.
  Can somebody advise how to solve it?</p>