2012-07-24 3 views
0

J'utilise Highslide pour montrer mes photos. Je veux présenter la galerie simple - si quelqu'un clique sur la photo "dolno.jpg" il montrera la galerie avec 3 photos. Maintenant est seulement un (1.jpg). J'ai 3 photos: 1.jpg, 2.jpg, 3.jpg Comment est-ce que je peux faire ceci? Ceci est mon code:galerie highslide

<script type="text/javascript" src="/highslide/highslide.js"></script> 
<link rel="stylesheet" type="text/css" href="/highslide/highslide.css" /> 
<script type="text/javascript"> 
    // override Highslide settings here 
    // instead of editing the highslide.js file 
    hs.graphicsDir = '/highslide/graphics/'; 
</script> 

<td> 
<a class="highslide" href="1.jpg" onclick="return hs.expand(this, { captionText: '<b>THIS</b>' })"> 
<img src="/logafirm/dolno.jpg" id="imgg" title="Click to enlarge" height="80" weight="80"></a> 
<font color="#52180"><b>THIS</font></b></A> 
</td> 

Répondre

0

Juste dupliquer l'élément d'ancrage pour chaque autre image que vous voulez afficher.

Vous aimez cette

<a class="highslide" href="1.jpg" onclick="return hs.expand(this, { captionText: '<b>THIS</b>' })"> 
    <img src="/logafirm/dolno.jpg" id="imgg" title="Click to enlarge" height="80" weight="80"> 
</a> 
<a class="highslide" href="2.jpg" onclick="return hs.expand(this, { captionText: '<b>THE OTHER IMAGE</b>' })"> 
    <img src="/logafirm/THE_OTHER_IMAGE.jpg" id="imgg" title="Click to enlarge" height="80" weight="80"> 
</a> 

Alsó vous aurez besoin de spécifier vos paramètres du diaporama ..

Selon les docs:

<script type="text/javascript"> 
hs.addSlideshow({ 
// slideshowGroup: 'group1', 
interval: 5000, 
repeat: false, 
useControls: true, 
fixedControls: true, 
overlayOptions: { 
    opacity: .6, 
    position: 'top center', 
    hideOnMouseOut: true 
} 
}); 

// Optional: a crossfade transition looks good with the slideshow 
hs.transitions = ['expand', 'crossfade']; 
</script> 

Et lastly..If vous voulez afficher uniquement première vignette , cachez simplement les autres .. Avec CSS ou peut-être mieux avec javascript (l'utilisateur sans js verra les images)

Questions connexes