DotNetNuke Skins and Resources by ThinkofDesign

Forums

Greybox Image gallery

    I tried to build an image gallery with greybox using thumbnails but I'm running into problems.I need help,here is my code

Attachment: gallery-Code.txt

    I know that the URL of the images need to be change,my problem is how to replace the rel method with the onclick.Also what a about the nice_pics?
Your nice_pics must be an array... So before the links you have to create the array with the URLs of your pics and their captions.

Example:

< script>
var nice_pics = [{'caption': 'Night valley', 'url': 'static_files/night_valley.jpg'}, {'caption': 'Salt flats in Chile', 'url': 'static_files/salt.jpg'}]
< /script>

and then your links:

< ul>
    < li>< a href="static_files/night_valley.jpg" onclick="return GB_showImageSet(nice_pics, 1)" title="Night valley">< img src="static_files/night_valley_thumb.jpg" />< /a>< /li>
    < li>< a href="static_files/salt.jpg" onclick="return GB_showImageSet(nice_pics, 2)" title="Salt flats in Chile">< img src="static_files/salt_thumb.gif" />< /a>< /li>
< /ul>
again thank you for your help,it did work



ActiveForums 3.7