• Hiya,

    I’m trying to modify my current theme and I’ve run into an area thats got me stumped.

    https://paulhaydock.com/

    In my main blog box, I’m using the following code:

    <!--POST SECTION-->
    <div class="eslabout">
        <ul class="idTabs">
            <li>
                <a href="#news">
                    Blog
                </a>
            </li>
        </ul>
        <div style="clear: both;"></div>
        <div id="news">
            <div class="subabout"  style="min-height: 485px">

    Followed by the post etc…

    What I want to do is create Previous and Next post buttons in the list were currently I have the word ‘Blog’…and to load the content into the div without having to reload the page for the posts.

    Anyone able to help / advise?

    Thank you in advance,

    Paul

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You will need to use AJAX in order to avoid page loads. Your script will need to keep track of what page it is on. The next and previous “links”, instead of being actual links, actually initiate javascript that adds or subtracts from the current page number, then sends an AJAX request for the next/previous post.

    Your AJAX handler would then query for the proper post and respond with the proper content for javascript to insert as the innmer HTML for the div container.

Viewing 1 replies (of 1 total)
  • The topic ‘Next / Previous links updating div content’ is closed to new replies.