Results 1 to 2 of 2

Thread: Ultimate Fade-in slideshow 2.1

  1. #1
    Join Date
    Sep 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow 2.1

    Hi!

    I want to open a shadowbox window as a link on a picture from the
    (Ultimate Fade-in slideshow code.

    I´m not a hacker but tried this:

    Building my array in my html file:
    Code:
    imagearray: [
    ["image_1.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Valbar text."],
    ["image_2.jpg", "http://en.wikipedia.org/wiki/Cave", "shadowbox", "Valbar text."] //<--no trailing comma after very last image element!
    ],
    Note the shadowbox on image_2


    Edeting my fadeinslideshow.js file
    Code:
    fadeSlideShow.routines={
    
    	getSlideHTML:function(imgelement){
    		if (imgelement[2] == "shadowbox") {
    			var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" rel="shadowbox;width=950;height=600;">\n' : ''
    		}
    		else {
    			var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' 
    		}
    		layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0;" />\n'
    		layerHTML+=(imgelement[1])? '</a>\n' : ''
    		return layerHTML //return HTML for this layer
    	},
    
    	getFullHTML:function(imagearray){
    		var preloadhtml=''
    		for (var i=0; i<imagearray.length; i++)
    			preloadhtml+=this.getSlideHTML(imagearray[i])
    		return preloadhtml
    	},
    Note:
    My edit is in the getSlideHTML function.. the if and else statment.
    Else-code is original code.
    The if statement is suppose to generat a target= or rel= depending on input in html file.

    So.. I´m just simply trying to create the REL thing direcly in the generated html code. All working except for the REL thing so no shadowbox opens.
    I suppose i have to let the fadeinslideshow script know about the shadowbox functions somehow and somewhere?
    Ofcource my html is setup for shadowbox and works there on other links.

    Hope some one can hint me!?
    Or how i should do this diffrent?

    (I do see now that there is a 2.4 version out.. but this post is 2.1 code)
    (Also.. will fix the size of the shadowbox to be dynamic after getting it to wor in the first place)

    Thnx in advance..

  2. #2
    Join Date
    Sep 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oh.. very poor subject.. can i change?
    sorry..

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
  •