title: Change Id & Class Inside a variable containing html code jquery
body: <p><a href="https://i.stack.imgur.com/YTEfL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YTEfL.png" alt="enter image description here"></a></p>
  
  <p>What I'm Trying to Do is On click of AddMore Button I'm Getting id of the button</p>
  
  <pre><code> &lt;div id="MemberCountDiv"&gt;
                  &lt;div class="MemberDescriptionAdd" style="display:none;"&gt;
                      &lt;select name="MemberCountType" id="MemberCountTypeX" class="MemberCountTypeX form-control "&gt;
                          &lt;option selected="selected" value=""&gt;Condition&lt;/option&gt;
                          &lt;option value="&lt;"&gt;Less Than (&amp;le;)&lt;/option&gt;
                          &lt;option value="&gt;"&gt;Greater Than (&amp;ge;)&lt;/option&gt;
                          &lt;option value="="&gt;Equal&lt;/option&gt;
                      &lt;/select&gt;
                      &lt;select name="MemberCount" id="MemberCountX" class="MemberCountX form-control "&gt;
                          &lt;option selected="selected" value=""&gt;Members&lt;/option&gt;
                          &lt;option value="1"&gt;1&lt;/option&gt;
                          &lt;option value="2"&gt;2&lt;/option&gt;
                          &lt;option value="3"&gt;3&lt;/option&gt;
                          &lt;option value="4"&gt;4&lt;/option&gt;
                          &lt;option value="5"&gt;5&lt;/option&gt;
                          &lt;option value="6"&gt;6&lt;/option&gt;
                          &lt;option value="8"&gt;7 Or More Than 7&lt;/option&gt;
                      &lt;/select&gt;
                      &lt;button id="RemoveX" class="btn btn-blue" type="button"&gt;Remove&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>I have kept this div and what I'm On click is </p>
  
  <pre><code>$(".AddMoreButton").click(function () {
          var type = $(this).val();
          var idname = $(this).attr("id");
          var id = idname.replace("AddMore", "");
          alert(id);
          var adddiv = $('#MemberCountDiv').html();
          alert(adddiv);
          adddiv.find('.MemberDescriptionAdd').attr('id', 'your-new-id');
          alert(adddiv);
      });
  </code></pre>
  
  <p>What I'm trying to do is append id to the id and the class</p>
  
  <p>Error:</p>
  
  <pre><code>adddiv.find is not function
  </code></pre>