PDA

View Full Version : Swissarmy



shotgun
01-15-2012, 04:04 PM
Hello, could someone please help or point me in the right direction. First off thanks to the authors for there great work and contributions. Using swissarmy.js, and it is a great piece of work. I am trying to add a caption before or on top of the the image shown. I am feeding the code from a database and would like the title above the image and then the description below the image.

The input usually looks like, "'.$def_url.'", "'.$def_name.'", "_new"];
With my added variable, "'.$def_url.'", "'.$def_name.'", "_new","'.$def_title.'"];

I have been trying with
this.title=this.imgs[5];
and
this.title=this.imgs[p][5];

then changing line #96 from
document.write('<div align="center"><div id=
to
document.write('<div align="center">'+this.title+'<\/div><div align=

but having no luck what so ever, any help is really appreciated

shotgun

shotgun
01-16-2012, 01:14 AM
Figured it on my lonesome, if anyone cares here you go

where populateslide=function(picobj, picidx)
under var slideHTML=
add slideHTML+='<div align="center" id="itemTitle">'+this.imgs[picidx][5]+'<\/div>

add a little space between text and image
<div style="height:8px;"><\/div>

in your css file itemTitle takes it effects