A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Javascript Picture Gallery

  1. #1
    Member
    Join Date
    Sep 2005
    Posts
    51

    Javascript Picture Gallery

    Can anyone tell me how on the apple website link they made it so when you click either 17 inch, 20 inch, or 24 inch, the new image fades in?:

    http://store.apple.com/1-800-MY-APPL...34A4&nclm=iMac

    I looked at the code and saw where the 17 inch computer image is but I don't understand where they refer to the 20 and 24 inch and make it fade in.

    Thanks for your help. I really appreciate it.

  2. #2
    No I can't do it by tommorow.. 1stbite's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    1,300
    Code:
    <script language="JavaScript" src="/rs/js/Gallery.js"></script>
        <script>
        var selectionGalleryConfig = {    
            initial : Gallery.TYPE_IMAGE,
            viewer : {elementId : "selection-gallery-window"},  
            image : {
                thumb : {elementId : "labels", cssClass : null, cssActiveClass : "active"},  
                full : {elementId : "selection-gallery-img-big"}
          
            },
            fade : {
                speed : 6,
                increment : 0.05
          
            }
        }
    
        selectionGalleryConfig.images = new Array();
        
          selectionGalleryConfig.images[0] = {full:"http://a248.e.akamai.net/7/248/2041/1164/store.apple.com/Catalog/US/Images/imac/img/product-17in.jpg"};
        
          selectionGalleryConfig.images[1] = {full:"http://a248.e.akamai.net/7/248/2041/1164/store.apple.com/Catalog/US/Images/imac/img/product-20in.jpg"};
        
          selectionGalleryConfig.images[2] = {full:"http://a248.e.akamai.net/7/248/2041/1164/store.apple.com/Catalog/US/Images/imac/img/product-24in.jpg"};
        
    
        var selectionGallery = new Gallery(selectionGalleryConfig);
        selectionGallery.index = 0;
        </script>
    and in a blink of an eye...
    Media and Multimedia Courses in Nottingham - First Diploma | IMedia | HND | Foundation Degrees | BA(Hons) Top Ups.

    Give a Twit a chance!

  3. #3
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    yes, and then the switching function is called from this link:
    Code:
    <a id="labels0" href="" onclick="selectionGallery.image(0); return false;" class="active">17 inch</a>
    the biggest thing is just needing that Gallery.js file with the Gallery class. look in that file if you want to learn exactly how its working. heres a direct link to the Gallery.js

  4. #4
    Member
    Join Date
    Sep 2005
    Posts
    51
    Thank you so much for your help.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center