2014-04-03 118 views
0

我遇到了java旋轉木馬的問題。代碼在我的頁面上工作正常,但我想添加超鏈接到圖像,但我不確定如何實現此目的。我已經嘗試了一些東西,但是它只是導致代碼停止工作,而旋轉木馬會丟棄頁面。將超鏈接添加到javascript圖像陣列

正如我所說,它的一切工作正常,但只要我改變默認代碼,它就會動搖。

我到目前爲止的代碼是:

<script type="text/javascript"> 

var firstbgcarousel=new bgCarousel({ 
    wrapperid: 'mybgcarousel', //ID of blank DIV on page to house carousel 
    imagearray: [ 
     ['autumnpark.jpg', '<h2>Autumn Day</h2>The sun peaks through the trees, a knife that cuts through the chill, crisp air.'], //["image_path", "optional description"] 
     ['chime.jpg', '<h2>Wind Chime</h2>The bellweather of the sky, the chime speaks of impending turmoil.'], 
     ['girlportrait.jpg', 'The scent of spring invigorates her as she inhales whilst the warm breeze brings a wave of tranquility.'], 
     ['redbench.jpg', 'Alone and Lonliness- Peace and Inner Struggle'] //<--no trailing comma after very last image element! 
    ], 
    displaymode: {type:'auto', pause:3000, cycles:2, stoponclick:false, pauseonmouseover:true}, 
    navbuttons: ['left.gif', 'right.gif', 'up.gif', 'down.gif'], // path to nav images 
    activeslideclass: 'selectedslide', // CSS class that gets added to currently shown DIV slide 
    orientation: 'h', //Valid values: "h" or "v" 
    persist: true, //remember last viewed slide and recall within same session? 
    slideduration: 500 //transition duration (milliseconds) 
}) 

</script> 

任何幫助表示讚賞....這裏

回答