• Hi everyone,

    We’re trying to set up our index.php page so that users can click buttons to swap individual stories with alternate stories. So, for example, let’s say that the index displays ten posts. Each post would have alternates assigned to it. And if you clicked a button, you could swap a single post for one of its alternates without having to reload the page. So, for example, let’s say one of the posts on the homepage is post id 5. We could assign an alternate that is post is 12. Clicking on a button would swap the headline, content, etc. of 5 for that of 12. Has anyone done something like this with Javascript? Any suggestions for how we might do this? We would also like to be able to swap all the posts for the next posts without reloading the page, using Javascript.

    I assume that both of these options will require us to preload all the alternate stories. However, if there’s a way around that, I would love to know. Our real goal is to have the alternate post ids defined not in advance, but by the combination of actions that the user takes once she’s arrived on the homepage.

    Any help is much appreciated here–thanks!

The topic ‘How to replace posts with new posts w/out reloading page?’ is closed to new replies.