title: How do I add a DOM element with jQuery?
body: <p>I have a funciton that I am currently using to show a hidden div.a_type</p>
  
  <p>How can I modify this code so that instead of fading in the hidden div,
  I can add the new div to the DOM</p>
  
  <pre>
  jQuery(function(){   // Add Answer
  
      jQuery(".add_answer").click(function(){
        if(count >= "4"){
          alert('Only 4 Answers Allowed');
          }else{
        var count = $(this).attr("alt");
        count++;
        $(this).parents('div:first').find('.a_type_'+count+'').fadeIn();
        $(this).attr("alt", count);
      }
  
      }); 
  
  });
  </pre>
  
  <hr>
  
  <p>Ok, now that i have this sorted out, i have one more question,</p>
  
  <p>I have another function that removes the inserted div's if a button is clicked.
  It's not working now that the additional divs are not loaded into the dom on pageload.
  How can i trigger the function to remove these now?</p>
  
  <p>jQuery(function(){   // Hide Answer</p>
  
  <pre><code>jQuery(".destroy_answer").click(function(){
    $(this).parents("div:first").fadeOut(function (){ $(this).remove() });
     var count = $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt");
     count--;
     $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt", count);
  
  }); 
  </code></pre>
  
  <p>});</p>