0

I am using Jquery tabs in my project, and it all works fine.

However when the user opens the page, the page displays all the material in all the tabs for a second first, then it executes the javascript and the screen comes back to normal.

It's an ugly sight, how can I prevent this? Is there a way to show the page after all the loading is done only?

Pecheneg
  • 768
  • 3
  • 11
  • 27
  • 2
    Possible duplicate of [display HTML page after loading complete](http://stackoverflow.com/questions/3629762/display-html-page-after-loading-complete) – Mike Scotty Dec 21 '16 at 10:27

1 Answers1

1

You could try hiding your content when the page loads and using JQuery to reveal it.

HTML:

<div id="contentDiv" style="display: none;">....</div>

JavaScript:

jQuery(document).ready(function ($) {$('#orderContentsInfoBox').css('display','block');});

This jQuery function fires when the document is fully loaded. If you are still seeing a flicker of content before it is hidden in tabs, then I would recommend finding the function that sets up the tabs and inserting the code to reveal the content div there. That way the content will only appear after all tabs are setup.

Jesse Potter
  • 827
  • 5
  • 20