title: How to create a new div onclick using jQuery
body: <p>I'm working on a task I need to display Post Content-Img-Title on click without reload the page.</p>
  
  <p>I've coded Below code:</p>
  
  <pre><code>// code for ajax portfolio
  jQuery('span#ajax_post_abc a').click(function(){
      var portfolio_post_id= jQuery(this).attr('id');
      var ajaxurl = jQuery('#ajax-script-url').val();
  
      jQuery.ajax({
          type: 'POST',
          url: ajaxurl,        
          data: {
              "action": "load-filter2", 
              port_post_id: portfolio_post_id 
          },
          success: function(response) {
              jQuery(".aajax-post-content").html(response); }  
          });
      });
  
      //New Ajax portfolio div 
      jQuery('#ajax_post_abc').click(function() {
          jQuery(this).addClass('aajax-post-content');
      });  
  </code></pre>
  
  <p>And the resultant response in will be displayed in <code>aajax-post-content</code> div.
  But the problem is if I have <code>n</code> posts and I click on <code>n+1</code>, <code>n+2</code> and so on it does not shows the output. But if I click on the very first Post <code>n0</code> then it will show the output as I need.</p>