JQuery causing page to flicker and load slowly

BrighteyesDesign
BrighteyesDesign used Ask the Experts™
on
I have built a site using a few Jquery functions...http://www.anjoman.co.uk/

When you navigate from one page to the next the page does strange things for a second.

I'm guessing there's a delay in loading something, maybe the clock Jquery as the pages work fine without it.

Is there any way to stop this?

I have attached a typical header code and the clock js file
<title>Join Anjoman</title>

    
    
	<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
    
    <!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]--> 
	<script type="text/javascript" src="js/coolclock.js"></script> 
	
    

<script type="text/javascript" src="js/dropmenu.js"></script> 
<script src="SpryAssets/SpryValidationCheckbox.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="css/menu.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="anjoman.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationCheckbox.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />



<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
    </script>
    
    
</head>

Open in new window

coolclock.js
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
leakim971Multitechnician
Top Expert 2014

Commented:
replace :
    <script type="text/javascript" src="js/dropmenu.js"></script> 
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>

Open in new window

by :
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
  <script type="text/javascript" src="js/dropmenu.js"></script> 

Open in new window

Author

Commented:
Thanks for that,

I am now using the attached code.

But it's still happening. You can see it here...

http://www.anjoman.co.uk/joinanjoman.php

If you refresh the page you'll see the flicker
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
  <script type="text/javascript" src="js/dropmenu.js"></script> 
    
    <!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]--> 
	<script type="text/javascript" src="js/coolclock.js"></script> 
	
    


<script src="SpryAssets/SpryValidationCheckbox.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="css/menu.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="anjoman.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationCheckbox.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />



<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
    </script>
    
    
</head>

Open in new window

leakim971Multitechnician
Top Expert 2014

Commented:
the other page have the same problem
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Author

Commented:
Yes, all pages still have the problem, i'm sure it's something to do with the colclock.js as when the clocks are removed everything is ok.
I have manged to fix this in the end by using an iframe

Author

Commented:
Not exactly what I was after but works none the less and could be a solution to others out there.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial