Results 1 to 5 of 5

Thread: Ult fade in slideshow:any way to add alt/title tags to images?

  1. #1
    Join Date
    May 2008
    Posts
    23
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Ult fade in slideshow:any way to add alt/title tags to images?

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

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

    3) Describe problem:
    Im sure asked before but search didn't find a thread. Any way to add alt/title tags to images?

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    HI avdistribution. I'm not entirely sure if it is the right way to do it, but here's how I did it.
    In the fadeslideshow.js around line 217, I added the blue stuff:
    Code:
    fadeSlideShow.routines={
    
    getSlideHTML:function(imgelement){
    var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'" alt="'+imgelement[4]+'" title="'+imgelement[5]+'">\n' : '' //hyperlink, alt and title?
    layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n'
    layerHTML+=(imgelement[1])? '</a>\n' : ''
    return layerHTML //return HTML for this layer
    	},
    and then the image arrays where written like this
    Code:
    ["images/1.jpg", "http://dynamicdrive.com/forums", "_new", "this is a description of image 1", "this is the alt text for image 1", "this is the title of image 1"],
    ["images/2.jpg", "http://dynamicdrive.com/forums", "_new", "this is a description of image 2", "this is the alt text for image 2", "this is the title of image 2"],
    ["images/3.jpg", "http://dynamicdrive.com/forums", "_new", "this is a description of image 3", "this is the alt text for image 3", "this is the title of image 3"]
    The title can be seen when you hover over the image. The alt text can be seen if you save the page f.ex to the desktop and then view the source of the saved page.
    Tell me if it works for you

  3. The Following User Says Thank You to azoomer For This Useful Post:

    avdistribution (09-03-2010)

  4. #3
    Join Date
    May 2008
    Posts
    23
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the response. I think I added it right but still no tags on this page
    Here's the fadeslideshowfile and here's the array file.

  5. #4
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Hi, this is my page and this is the fadeslideshow.js that is used. The alt and title tags are in the DOM and can't be seen directly when viewing the source, but if you download the entire page and then open it in a text editor you will see it.
    In the fadeslideshowfile on your server I cant find this line when I make a search for some of the elements
    var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'" alt="'+imgelement[4]+'" title="'+imgelement[5]+'">\n' : ''
    But it seems like the script is minified somehow which makes it difficult for me to understand.

  6. The Following User Says Thank You to azoomer For This Useful Post:

    avdistribution (09-03-2010)

  7. #5
    Join Date
    May 2008
    Posts
    23
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    My bad-the tags weren't showing up on a full screen size slide show-but on a smaller one they do. So obviously it works, which is much appreciated.
    The scripts are directly from dd with few adjustments so don't know why they appear minified.

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
  •