14, February 2012

Preloading images or what to avoid this? - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Preloading images or what to avoid this?
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Preloading images or what to avoid this?  (Read 1845 times)
OMG!I am geek
**
Gender: Male
Posts: 57
374 credits
Members referred : 0



« on: Nov 14, 2008, 01:20:20 pm »

Need a helping hand. See this site:
http://gespoliza.com/

The jquery based cycle picture slider. When you load the page, all the images that compose the slider show one below the other before the thing starts cycling. I have tried preloading these images to see if they wouldn't show like this, but doesn't seem to work. Anyone can teach me how to show the images properly, that is in the slider, not before ?

Thanks in advance
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #1 on: Nov 14, 2008, 01:55:26 pm »

Why don't you just use the code of this site? It seems that this fellow is using standard jquery plugins to make this work.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
OMG!I am geek
**
Gender: Male
Posts: 57
374 credits
Members referred : 0



« Reply #2 on: Nov 14, 2008, 01:58:09 pm »

Why don't you just use the code of this site? It seems that this fellow is using standard jquery plugins to make this work.

Hi Nikolas, thanks for the reply. This fellow is me, the site is made by me. Yes, using Drupal 5.x with jquery but just don't know how to avoid pictures showing before the actual cycle effect starts.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #3 on: Nov 14, 2008, 02:15:18 pm »

lol, now I got it.

$(document).ready(function().... is executing after the DOM is loaded but before the page is loaded try $(document).load(function()....

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
OMG!I am geek
**
Gender: Male
Posts: 57
374 credits
Members referred : 0



« Reply #4 on: Nov 22, 2008, 04:17:55 pm »

Thanks, tried that but doesn't seem to do much.
Now have added something like:

'document.write("<style type=text/css>#picslide{display: none;}<\/style>")');

in the front page document, where picslide is the div ID that contains the pictures. Seems to make things better in IE7 and FF2 (not in Opera) but still not what i am looking for. Will just have to tread the web till I find the right method,
My name is Bong, James Bong
*
Posts: 11
80 credits
Members referred : 0



« Reply #5 on: Apr 18, 2009, 01:21:21 pm »

Quote from: Drupaljohn
Thanks, tried that but doesn't seem to do much.
Now have added something like:

'document.write("<style type=text/css>#picslide{display: none;}<\/style>")');

in the front page document, where picslide is the div ID that contains the pictures. Seems to make things better in IE7 and FF2 (not in Opera) but still not what i am looking for. Will just have to tread the web till I find the right method,
Nice workaround Smiley

You could also do this in your CSS. Having this in your css file:

.js #picslide{display:none}

and then adding .js class to your body tag with javascript or jquery Smiley
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=8184
Tags : jquery cycle Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Preloading images or what to avoid this?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 05:25:57 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.