Pop-up gallery of images

Asked

Viewed 836 times

3

I have in an HTML file this: inserir a descrição da imagem aqui

And I wanted when you click on one of the images to pop up a slide of images, like a gallery. Something like this http://www.monocapa.pt/portfolio.php, someone knows how to?

  • You use jQuery, Angular, or some other javascript framework in your project?

2 answers

3

Use Shadowbox JS, and being extremely lightweight is extremely easy to implement: https://github.com/mjackson/shadowbox

<!-- insere os arquivos do shadowbox -->
<link href='source/shadowbox.css' rel='stylesheet' type='text/css'/>
<script src='source/shadowbox.js' type='text/javascript'/>

<!-- inicializa o shadowbox -->      
<script type='text/javascript'>Shadowbox.init();</script>

Using in your images

<a href="imagem_grande.jpg" rel="shadowbox">
    <img src="imagem_pequena.jpg">
</a>

3


If you want to equal what is being used on this site is the FancyBox one plugin in JQuery. This link has all the instructions on how to use and the files to download. http://fancyapps.com/fancybox/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.