Solved

Stopping flash before Jquery populated content

Posted on 2013-01-02
3
179 Views
Last Modified: 2013-01-10
Hi,

I am using JQuery to amend some content on my page depending on a querystring.
I am using $(document).ready to run it however there is a flicker while the page is loading then the dynamic content is displayed.
Is there a way to get round this?

I target a class called ".dynamicCall" where the content is shown.

Thanks
0
Comment
Question by:Al4ddin2
  • 2
3 Comments
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 38736635
Hi,

you could make the ".dynamicCall" area have either a style of display: none; or visibility: hidden; by default in your css, and then in the $(document).ready function after you have added the dynamic content, change the visibility css to visible or change the display css to block or inline whatever it needs to be for your page.

That way you shouldn't see anything there until it is loaded and ready to be displayed.
0
 

Author Comment

by:Al4ddin2
ID: 38736646
Hi,

I have changed it so that as default the content is empty. However this still seems to load last, so the page renders and then the dynamic content renders. So it still 'flashes' a little.

Is there a way to remove this? Or force it to load earlier?
0
 
LVL 17

Accepted Solution

by:
jrm213jrm213 earned 500 total points
ID: 38736701
I am not exactly sure what you mean by "flashes" or "flickers" but the only thing I can think that might help, is if you have some idea of the height or width that the dynamic content will fill, then set those in your CSS and use visibility:hidden on the object until it is ready to be displayed.

Do you have a link we can look at to see what you seeing and better understand the situation?
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now