Results 1 to 3 of 3

Thread: Simple Controls Gallery v1.3 - 508 - ALT text?

  1. #1
    Join Date
    Dec 2005
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Simple Controls Gallery v1.3 - 508 - ALT text?

    1) Script Title: Simple Controls Gallery v1.3

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

    3) Describe problem: How can I make this 508 compliant with ALT text for each image in the cross-dissolve? I only need the cross-dissolve feature of this gallery and not the navigation.

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

    Default

    Firstly, if you don't need the navigation feature, you might be better off with Ultimate Fade In Slideshow instead. For that script, to add an alt attribute to each image (based on the description defined for each image inside the script), find the below chunk of code inside the .js file:

    Code:
    	getSlideHTML:function(imgelement){
    		var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
    		layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n'
    		layerHTML+=(imgelement[1])? '</a>\n' : ''
    		return layerHTML //return HTML for this layer
    	},
    and replace that with:

    Code:
    	getSlideHTML:function(imgelement){
    		var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
    		layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" alt="'+imgelement[3]+'" />\n'
    		layerHTML+=(imgelement[1])? '</a>\n' : ''
    		return layerHTML //return HTML for this layer
    	},
    That should do it.
    DD Admin

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

    Anessa05 (07-28-2010)

  4. #3
    Join Date
    Dec 2005
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Thanks!

    Thanks for the quick reply and suggestion!

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
  •