title: Jquery to expand/collapse gridview row not working for the second row of the gridview
body: <p>It is working absolutely fine on clicking the first image control in the first row of the gridview but for the second row, when I am clicking the same Plus image with id as imgPlus, it's not working. The JQuery is as follows:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("#imgPlus").on("click", function () {
  
                  if ($(this).attr("src") == "Images/Plus.JPG") {
                      $(this).closest("tr").after("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td colspan = '999'&gt;" + $(this).next().html() + "&lt;/td&gt;&lt;/tr&gt;")
                      $(this).attr("src", "Images/Minus.JPG")
  
                  }
                  else {
                         $(this).attr("src", "Images/Plus.JPG");
                      $(this).closest("tr").next().remove();
                  }
              });
          });
      &lt;/script&gt;
  </code></pre>