Results 1 to 5 of 5

Thread: background-image-carousel: seconde desc-container?

  1. #1
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default background-image-carousel: seconde desc-container?

    1) Script Title: Background Image Carousel

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

    3) Describe problem: Is there any chance to add a second description-container to this script?
    what i tried to success:
    - i added a second div.slide div.desc2 in the head-section
    - i tried several things in the .js-file.

    i think the important point in the script to change is this point:

    + ((imgref[1])? '<div class="desc" style="display:none">' + imgref[1] + '</div>\n' : '')
    + ((imgref[2])? '<div class="desc2" style="display:none">' + imgref[2] + '</div>\n' : '')
    + '</div>'

    A pity I have no idea, what "imgref" does...

    Thanks a lot for help in advance!

  2. #2
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Found the solution by myself.
    But I have another question. Is it possible to link directly to one specific slide image? Somethink like this: www.url.com/#secondslide

    Thanks for your help!

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    schwiminator, try the below modified .js file, which should let you select a particular slide to show when the page loads if there's a hash tag in the URL in the form of:
    Code:
    yoursite.com/#INTslide
    Where int is a number from 0 onwards (0=1st slide, 1=2nd slide etc). More examples of valid hash tags:

    Code:
    yoursite.com/mypage#0slide
    yoursite.com/mypage#1slide
    Reload the page upon changing the hash tag to see the selected image change.
    DD Admin

  4. #4
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Okay, thanks! But is there also a possibilty to get direct links - no hashs?
    That I can just put a <a href=...> ?
    Cause now you MUST reload the page....

  5. #5
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blind one desc-container after xy seconds

    And another question:
    I now have two desc-container. Is it possible that one hides after e.g. 2 seconds? I thought I only could add those jQuery-codes in the js-code in line 59:

    .find('desc1').slideDown().find('desc2').stop().hide(blind,,2000)

    And the same in line 117.

    But that doesnt work. Any ideas? Thanks!

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
  •