cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dave_bull
Community Participant

Custom JavaScript and on screen changes...

Hi All,

I've added a few lines of custom JavaScript to our site that changes the names of a few menu items.

However, I've had complaints that the original names flash up on the screen for a fraction of a second before changing to the new ones.

Does anyone know how to overcome this?

I was thinking to see if I could add a few fractions of a second to the screen refresh time to see if that would help but my JavaScript Kung Fu is not particularly strong!

Regards

Dave

Labels (3)
0 Kudos
1 Reply
jsimon3
Community Participant

You might have to show us what and how you are using it...Also where is it hosted through the themes section of Canvas or is it a third party where fetch times are dependent upon the load. Also try this:

if (document.readyState !== "loading") {
  console.info("1");
  //add something like your code
}