title: How to load Wordpress Post with Ajax onclick
body: <p>I have spent hours reading and trying tutorials. I cant seem to find a solution that works and I know it should be pretty easy but I struggle with AJAX. :(</p>
  
  <p>I want to load Post content from a link in a div.
  Below is what I have. Can someone please help me with the JavaScript side? Thanks!</p>
  
  <pre><code>&lt;ul&gt;
      &lt;?php query_posts('post_type=artwork&amp;posts_per_page=-1'); ?&gt;
      &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
      &lt;li class="mytab"&gt;
        &lt;span&gt;
           &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
           &lt;a href="#"&gt;&lt;?php the_post_thumbnail('Project'); ?&gt;&lt;/a&gt;
        &lt;/span&gt;
      &lt;/li&gt;
      &lt;?php endwhile; endif; wp_reset_query(); ?&gt;
  &lt;/ul&gt;
  
  &lt;div id="loadAjaxHere"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to load this code in div #loadAjaxHere</p>
  
  <pre><code>&lt;div class="myArtwork"&gt;
     &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
     &lt;div class="text"&gt;&lt;?php the_content(); ?&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Thank you for the help!!</p>