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. :(
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!
<ul>
<?php query_posts('post_type=artwork&posts_per_page=-1'); ?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<li class="mytab">
<span>
<h3><?php the_title(); ?></h3>
<a href="#"><?php the_post_thumbnail('Project'); ?></a>
</span>
</li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
<div id="loadAjaxHere"></div>
I want to load this code in div #loadAjaxHere
<div class="myArtwork">
<h2><?php the_title(); ?></h2>
<div class="text"><?php the_content(); ?></div>
</div>
Thank you for the help!!