i'm trying to modify the supersized slideshow plugin to get images from a list ( inside the html source ) and not from the javascript. The aim of this trick is to let google indicize the images.
this is the original code
<script type="text/javascript">
jQuery(function($){
$.supersized({
slide_interval : 3000,
transition : 1,
transition_speed : 700
slide_links : 'blank'
slides : [
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''},
{image : 'image.jpg', title : 'title', thumb : 'image.jpg', url : ''}
]
});
});
</script>
and i would like to use a code like this
<ul id="supersized">
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
<li><img alt="text" title="text" src="image.jpg" /></li>
</ul>
<script type="text/javascript">
jQuery(function($){
$.supersized({
<code>
</script>
can anybody help me ? :)
I found a solution to your problem
This is the FIDDLE
this is the jQuery code
First of all i insert all src attributes of image in array
with this array i create properties in obj.slides array (first object of script)
and then i use this obj object for set parameters for supersized plugin.
for this result i used the scripts and css that i found in the plugin's download package, check "external resources" tab of fiddle page.
A shortest way to get the same result coul be this Fiddle
instead of creating an array in this case i add images paths directly in obj