# How to make an image grow and make everything else dark until you click close

**URL:** <https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557>\
**Category:** Rails\
**Created:** [November 18, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557 "2008-11-18T19:30:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [November 18, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557/1 "2008-11-18T19:30:52Z")

</div>

Anyone know an easy way to do this? I have some web links in my app  
with pictures, and I’d like to implement that effect that I’ve seen a  
lot where when the user clicks on the image, it sort of grows and the  
rest of the page becomes dark until the user clicks close (or clicks  
the picture). Is there an easy rails plugin for this?

thanks,  
dino

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [November 18, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557/2 "2008-11-18T19:35:33Z")

</div>

Hey Dino -  
On 18-Nov-08, at 1:29 PM, dino d. wrote:

> Anyone know an easy way to do this? I have some web links in my app  
> with pictures, and I’d like to implement that effect that I’ve seen a  
> lot where when the user clicks on the image, it sort of grows and the  
> rest of the page becomes dark until the user clicks close (or clicks  
> the picture). Is there an easy rails plugin for this?
> 
> thanks,  
> dino

The effect is called a lightbox.

we use lightbox2 at HomeStars

[http://huddletogether.com/projects/lightbox2/](http://huddletogether.com/projects/lightbox2/)

Jodi

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [November 18, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557/3 "2008-11-18T21:28:42Z")

</div>

Thanks, works great!

Dino
