You skipped the first step. On feste.shtml change:
Code:
<script type="text/javascript">
stepcarousel.setup({
galleryid: 'scritte', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:false, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['img/left.gif', 2, 376], rightnav: ['img/right.gif', -23, 376]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})
</script>
to:
Code:
<script type="text/javascript">
(function(){
function getQval(n) {
if(typeof n !== 'string'){
return null;
}
var r = new RegExp('[?&;]' + n + '=([^&;#]*)'), m = location.search;
return (m = r.exec(m))? unescape(m[1]) : null;
}
var initpanel = getQval('scritte');
stepcarousel.setup({
galleryid: 'scritte', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:false, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['img/left.gif', 2, 376], rightnav: ['img/right.gif', -23, 376]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'], //content setting ['inline'] or ['ajax', 'path_to_external_file']
oninit: function(){
if(initpanel){
stepcarousel.stepTo('scritte', initpanel);
}
}
})
})();
</script>
Also on feste.shtml you have the js/stepcarousel.js external tag twice. You only need it once. Get rid of this (the second) one:
Code:
</div>
<div id="main_bkg"></div>
</div>
<!--
<div id="right_nav">
<div id="right_nav_text">Testo da inserire per il menu di navigaizone a destra</div>
<div id="right_nav_bkg"></div>
</div>
-->
<div id="bottom">
<script type="text/javascript" src="js/stepcarousel.js">
/***********************************************
* Step Carousel Viewer script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<style type="text/css">
.stepcarousel{
position: relative; /*leave this value alone*/
//border: 3px solid black; . . .
And the styles can and should be combined into one style section in the head. But I'll leave that for another post. Let's just get this much working for now.
Bookmarks