Abrir popups estilo Mac
Postado por: Pedro Rogério em
Se você utiliza miniaturas de imagens em seu site, e gostaria que o usuário ao clicar, elas fossem abertas em um tamanho maior, existem várias soluções simples para isso, algumas amigáveis, outras não, mas uma solução que eu acho interessante são os Lightbox. Uma forma de conseguir efeitos desse tipo sem a utilização de frameworks JavaScript é utilizar o Fancyzoom.
Fancyzoom é um pequeno JavaScript que nos permite fazer zoom em imagens, através de um efeito “emergente” ao estilo MAC. Sua utilização é muito simples, basta adicionar 2 linhas de código ao seu site, semelhantes a essa:
<script src="/js-global/FancyZoom.js" type="text/javascript"></script>
<script src="/js-global/FancyZoomHTML.js" type="text/javascript"></script>
Após, é só adicionar o seguinte código ao body de sua página:
<body onload="setupZoom()">
Está pronto, o JavaScript agora fará o zoom em suas imagens automaticamente. Basta você colocar um link na imagem para a imagem maior, exemplo:
<a href="image.jpg"><img src="image-thumbnail.jpg" /></a>
Mas, se por um acaso você deseja que explicitamente alguma imagem não tenha zoom, basta adicionar o seguinte código no link da imagem:
<a href="image.jpg" rel="nozoom"> <img src="image-thumbnail.jpg" /></a>













Não vou negar que adorei a biblioteca, o estilo dela é inovador…
Mas ainda assim, normalmente você quer escolher quais imagens tenham esse efeito e não contrário…
Caso vc queira que a maioria do seu site NÃO tenha esse efeito, você teria que colocar o rel=”nozoom” nela?!?
Acho meio inconveniente, já que a maioria das bibliotecas desse generos fazem o inverso.
Abraços
muito bom… mas… pesadinho ne??
Só gostaria de sabe como colocar o botão “fechar” quando se clica na imagem?
I just discovered this blog searching for more information on how long it takes for a completely ruptured achilles tendon to grow scar tissue after surgery. I had a complete rupture of my rt. AT on June 29th playing frisbee. I heard a “pop” and felt like a hardball had hit my calf! My son in law who is a cardiologist almost immediately diagnosed my injury as a ruptured AT. I had surgery on July 3rd, was fitted with a plaster splint for 13 days and am currently 18 days post op. I was fitted with a Aircast pneumatic boot on Day 13 post op. When I was examined at Day 13, my surgeon informed me that he did plastic surgery on my incision. It looked very nice. I have been incrementally putting more weight on my boot walking around my condo with a single crutch. My son in law said it would take around six weeks for the repaired tendon to “scar” over but cautioned me to be patient with PT, etc. I am 64, and in good physical condition and a very good immune system. At least thats what I have been told. (I recovered form a broken ankle (compound fracture) in three weeks.) I am hoping that this will speed up my recovery. Like others, I have experienced a slight heel pain when walking around in the Aircast boot. I am particularly frustrated because I just bought a new Nissan 350Z convertible, 6 speed, 306 HP….and its just sitting there waiting to get a ticket! BTW, I stopped taking percocet (750 mg) on Day 10 due to no pain whatsoever. Good luck to everyone on a speedy and complete AT recovery!!