Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My jQuery "showcase" - opacity issue :)

I am having a bunch of photos and I'm looking for best way of displaying them at the same place using jQuery.

What do you think of my concept? Is it valid or maybe there are other ways than putting all images on each other and playing with opacity?

Anyways I don't know why this code:

jQuery('#demo img .'+itemClass).animate({opacity: 1});

Doesn't show a thing. Any helping hand?

http://jsfiddle.net/d4sEW/1/

like image 451
anonymous Avatar asked Mar 23 '26 16:03

anonymous


1 Answers

I´m pretty sure class names can´t start with a number, but even so, if your image has a certain class, you have to use img.'+itemClass instead of img .'+itemClass; you put a space between the img selector and the class.

Apart from that you will have to remove / fade-out the images that you don´t want to show as otherwise one image can show behind an image you don´t want to show.

like image 108
jeroen Avatar answered Mar 25 '26 05:03

jeroen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!