Pesquisar na Comunidade
Mostrando resultados para as tags ''galeria de imagens''.
Encontrado 1 registro
-
Olá pessoal ! I tenho um \Javascript\Galeria de Imagens\Script e estou tentando modificáfalo para ficar de maneira simples... O link é (http://www.colegioramoslopez.com/Internet_Explorer_9/image_gallery_test/1/index.html). O que eu preciso ter no momento é: 1-) Quando a página carrega....precisa ficar em (1/11), não em (0/11) e obviamente quando carregada em 1/11 mostrar a primeira imagem 1 de 11; 2-) Quando eu clicar no link 'close', deve fechar a janela... No aguardo Obrigado pela atenção Carlos ---------------- EIS O CÓDIGO .JS ABAIXO //GLOBALS var nl = "\n"; // new line, for nice code :-) var imgFolder = 'imagens_grandes'; //folder with subfolders that contain big images var smallFolder = 'imagens_pequenas'; //folder with subfolders that contain small images (thumbnails) var imgName = 'imagem'; //image name (e.g. the first image is photo-001 - or if you change name to "image" then the first image name is image-001) var imgExt = 'jpg'; //extension (filetype) for big images var smallExt = 'gif'; //extension (filetype) for small images var setColumns = 5; // how many columns per page var setRows = 0; // how many rows to skip before scroll starts, check and adjust manually var setHeight = 76+10+10; // this is important for scroller: max small image (thumbnail) height + <td> padding-top + <td> padding-bottom (see css file) //GLOBALS - GALLERY FOLDERS ('<folder>', <number of images>) var setFolders = Array ( Array('Museu_Leonardo_Da_Vinci',11) ); //GALLERY FUNCTIONS function leadingZero(getImage){ if (getImage < 10)setImage = "00" + getImage; if (getImage > 9 && getImage < 100)setImage = "0" + getImage; if (getImage > 99)setImage = getImage; return setImage; } function initGallery(){ showGallery(0,setFolders[0][1],setFolders[0][0]); } function showMenu(){ returnData = '<tr><td id="menu" colspan="'+ setColumns +'"> | '; for (getFolder = 0; getFolder < setFolders.length; getFolder++){ returnData += '<a href="javascript:showGallery(0,'+setFolders[getFolder][1]+',\''+setFolders[getFolder][0]+'\')">'+setFolders[getFolder][0]+'</a> | '; } returnData += '</td></tr>'+nl; return returnData; } function showGallery(getImage,maxImages,setFolder){ setImage = leadingZero(getImage); imgNxt = getImage + 1; imgPre = getImage - 1; if (imgNxt > maxImages)imgNxt = 1; if (imgPre < 1)imgPre = maxImages; returnData = '<table>'+nl; returnData += '<tr id="selector">'+nl; returnData += '<td><a href="javascript:showImage('+ imgPre +','+ maxImages +',\''+ setFolder +'\')">previous</a></td>'+nl; returnData += '<td align="center"><a href="javascript:showGallery('+ getImage +','+ maxImages +',\''+ setFolder +'\')">close</a></td>'+nl; returnData += '<td align="right"><a href="javascript:showImage('+ imgNxt +','+ maxImages +',\''+ setFolder +'\')">next</a></td>'+nl; returnData += '</tr>'+nl; returnData += '<tr><td colspan="3"><a href="javascript:showGallery('+ getImage +','+ maxImages +',\''+ setFolder +'\')"><img src="'+ imgFolder +'/'+ setFolder +'/'+ imgName +'-'+ setImage +'.'+ imgExt +'"></a></td></tr>'+nl; returnData += '<tr id="selector"><td colspan="3">'+ getImage +' / '+ maxImages +'</td></tr>'+nl; returnData += '</table>'+nl; writeData(returnData,0); } function showImage(getImage,maxImages,setFolder){ setImage = leadingZero(getImage); imgNxt = getImage + 1; imgPre = getImage - 1; if (imgNxt > maxImages)imgNxt = 1; if (imgPre < 1)imgPre = maxImages; returnData = '<table>'+nl; returnData += '<tr id="selector">'+nl; returnData += '<td><a href="javascript:showImage('+ imgPre +','+ maxImages +',\''+ setFolder +'\')">previous</a></td>'+nl; returnData += '<td align="center"><a href="javascript:showGallery('+ getImage +','+ maxImages +',\''+ setFolder +'\')">close</a></td>'+nl; returnData += '<td align="right"><a href="javascript:showImage('+ imgNxt +','+ maxImages +',\''+ setFolder +'\')">next</a></td>'+nl; returnData += '</tr>'+nl; returnData += '<tr><td colspan="3"><a href="javascript:showGallery('+ getImage +','+ maxImages +',\''+ setFolder +'\')"><img src="'+ imgFolder +'/'+ setFolder +'/'+ imgName +'-'+ setImage +'.'+ imgExt +'"></a></td></tr>'+nl; returnData += '<tr id="selector"><td colspan="3">'+ getImage +' / '+ maxImages +'</td></tr>'+nl; returnData += '</table>'+nl; writeData(returnData,0); } function writeData(returnData,setScroll){ document.getElementById('gallery').innerHTML = returnData; scrollTo(0,setScroll); } //START initGallery();