Perma Link
I had some complaints my jqdock (the menu at the top of this page) was klunky loading. Well I went back in time and created a loader div like we used to have in 90's that would display until the page is loaded. Not really I took a modern approach to it. But that's what I was thinking about doing and when I was searching it was like I was in the 90's again because I really couldn't find any examples on how to do it. Maybe loader wasn't the right search term. Page Loader well I guess means anything these days.
1st things first with jquery page loader.
get a div and set it to style="display:none;" In this case its my menu div. You can try doing the whole page. Could be pretty embarassing when it doesn't show up.
<div id="menux" style="display:none;">....
Then in the document.ready I turn on the jqDock.
Next step fadeTo(0,0) so I have a known startvalue then fadeTo(500,.8); so my menu fades in on some browsers. Some browsers it just shows up.
Before it was really jumpy at startup.
$('#menux').jqDock(opts);
$('#menux').fadeTo(0, 0).fadeTo(523,.8);
//Note the chain didn't work off the jqDocks so I have two steps here.
Thats it and
Good Luck
Comments Perma Link