->Hi,I hope all is well.
Here is what I have difficulties with, I am NOT good in Java Scripts and I wanted to have a Slide show Image on My Page and lucky was I to find these fancy slide shows here.
I downloaded necessary associated files and the whole setup was fine and the slide shows were there on My page,but hardcoded the source of images and the captions from var imagesDataArray variable as shown below:
var imagesDataArray = [
/*
This is the variable that Holds the Source of My Images and their Caption.
It is then called in a jQuery function
*/
{
src: 'pictures/One.jpg',
description: 'This is My Caption for a Picture One.'
}];
The above variable is then called in the following JQuery Function:
jQuery(function(){
$('#cubeslider').shockwave(imagesDataArray, {
'slider-type': 'CubeSlider',
/*DURATION IS SET IN ms */
'rotation-duration': 1000,
'slideshow-delay': 5000,
'tiles-in-x': 10,
'tiles-in-y': 1,
'rotation-axis': 'y',
'show-permanent-description': true,
'show-description-onimage': false,
'autostart-slideshow': true,
'viewport-dimension': {width: 630, height: 250}
});
})
The #cubeslider is a place holder (div) of the slide shows.
Now what I am in need of is to give var imagesDataArray all picked images from My database as src to the variable var imagesDataArray and their descriptions to be used as the description: to the variable var imagesDataArray so that when passed to the JQuery I'll be able to see all the images in a slide show.
Also My slide show is to be width: 630px and height: 250px as I defined in the JQuery function,but when I do that it wont be responsive and when I leave the part undefined the slide show wont have the desired dimensions (It is a bit small). I decided to put the dimensions on the place holder (div) area of My slide show but what happens the slide show is not hold in a (div) how to overcome this if any way I can do.
My php code for fetching the images and their description is as follows:
public function gallery_loader()
{
$sql="SELECT * FROM gallery WHERE id=1";
$query=mysql_query($sql);
while($finder=mysql_fetch_array($query))
{
$ImageSrc="gallery/".$finder['Image_Name'].$finder['Extension'];
$Description=$finder["Category"];
/*
This $ImageSrc should be passed to var imagesDataArray's src:
And this $Description to var imagesDataArray's description:
In a JQuery Function
*/
}
}
Thats all,thaks for any contribution in advance...