Solved

Stopping flash before Jquery populated content

Posted on 2013-01-02
3
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

739 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