Advanced Search

Results 1 to 10 of 10

Thread: SimpleGallery

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SimpleGallery

    1) Script Title: SimpleGallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...plegallery.htm

    3) Describe problem:

    Hello,

    I have a problem. My gallery has many pictures and I wish that the script does not preload all the images at startup. For example, it would be nice if the image charge at the time of display. Is this possible?

    Sorry for my English.

    Thank you in advance for your help.

  2. #2
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry I forgot to write the title

  3. #3
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    491
    Thanks
    32
    Thanked 21 Times in 21 Posts

    Default further down

    On the script page it tells you how to prevent the images from preloading by changing one word.

    It says to change:
    setting.preloadfirst
    to:
    setting.preloadfalse

    The above is located in the simplegallery.js file


    bud

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,550
    Thanks
    42
    Thanked 2,879 Times in 2,851 Posts
    Blog Entries
    12

    Default

    Not exactly. The preloadfirst is an option and you set it to true or false in the on page call, example (from Step 1 on the demo page, addition highlighted):

    Code:
    <script type="text/javascript">
    
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [
    		["http://i26.tinypic.com/11l7ls0.jpg", "http://en.wikipedia.org/wiki/Swimming_pool", "_new", "There's nothing like a nice swim in the Summer."],
    		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "", ""],
    		["http://i30.tinypic.com/531q3n.jpg", "", "", "Eat your fruits, it's good for you!"],
    		["http://i31.tinypic.com/119w28m.jpg", "", "", ""]
    	],
    	autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	preloadfirst: false,
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//Keyword "this": references current gallery instance
    		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
    		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
    	}
    })
    
    </script>
    If you don't set it, it defaults to true, which is probably what you currently have.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your answers but it changes nothing. All images will load at the start of the opening of the page.

    See image attached
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	simplegallery.jpg 
Views:	72 
Size:	12.8 KB 
ID:	3926  

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,550
    Thanks
    42
    Thanked 2,879 Times in 2,851 Posts
    Blog Entries
    12

    Default

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry I can not not in production, is developing.
    I had misconfigured, now it's ok for firefox but in IE9 images are all loaded at the start of the page

    Thank you

  8. #8
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did not say is that my firefox was cached images. it opens all the images on the page is opened.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,550
    Thanks
    42
    Thanked 2,879 Times in 2,851 Posts
    Blog Entries
    12

    Default

    Try this version of the script:

    simplegallery_iefix.js
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for your help! With this version it works as I want.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •