Skip to content

Reorganized page when refreshed #147277

Discussion options

You must be logged in to vote

Hi @Ethan-Mircheff ,

The issue you're encountering is likely due to how the two files (digits.html and digits2.html) are being loaded asynchronously with the $.get() method. Since both requests happen at the same time and you append their results to the same #digits paragraph, it's possible that the data from the files is not being appended in the correct order or at the correct positions, leading to the text appearing "switched."

Solution:

  1. Sequential Loading: Instead of appending the content from both files simultaneously, load the second file only after the first one has finished loading. This way, the text is appended correctly.
    You can achieve this by using $.get() within a callback …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ethan-Mircheff
Comment options

@harmeetsingh11
Comment options

@Ethan-Mircheff
Comment options

Answer selected by Ethan-Mircheff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Programming Help Programming languages, open source, and software development.
2 participants