tips on everything. share, find, keep.
login | register | blog | about
    

1 tip on jquery

Web Design - JQuery Loading

If you are using some form of slide show or carousel JQuery script that utilises unordered lists, on occasion you will see the unorderlist render on the page before JQuery kicks in. This is especially true if you place your JavaScript code at the bottom of the page.

So to stop this from happening you can do the following:

In your CSS code add the following to the element that JQuery is going to control

display:none;

Inside your JQuery code

jQuery().ready(function(){
and just before you call the script in question add the following

$('#element').show();

This will then counter the displaly:none css code and present your slideshow without any unwanted effects.

posted on 2010-11-04 by ComfortablyNumb | comments(11) | save

tags: web design, siteone, website, jquery, css

more at: North Wales Web Design