Hi Jared
The script is quite simply.
Study it.

jQuery:
(document).ready(function(){
 
 $('#thumbs div').click(function() {
    $(this).find('img').css('opacity', 1);
    $(this).siblings().find('img').css('opacity', 0.5);
 });
 
});

HTML:
<div id="thumbs">
<div><a href="#"><img src="1.jpg" alt="" /></a></div>
<div><a href="#"><img src="2.jpg" alt="" /></a></div>
<div><a href="#"><img src="3.jpg" alt="" /></a></div>
<div><a href="#"><img src="4.jpg" alt="" /></a></div>
<div><a href="#"><img src="5.jpg" alt="" /></a></div>
<div><a href="#"><img src="6.jpg" alt="" /></a></div>
</div>

Hope this help you

MaurĂ­cio
  -----Mensagem Original----- 
  De: Jared 
  Para: jQuery (English) 
  Enviada em: sexta-feira, 4 de dezembro de 2009 19:42
  Assunto: [jQuery] Change opacity for all divs except one


  Hello all,

  I have a bunch of thumb nails that will be at full opacity when a user
  gets to the page. Users will be able to select their favorite. What I
  want to have happen is when a user selects their first favorite all of
  the there thumbnails will be lowered in opacity then when they select
  other favorites the opacity of that thumbnail will be brought to full.
  Each thumbnail is in a div. I am at a complete lose on how I can
  achieve this. Any help is greatly appreciated. If you need anymore
  info just ask. Thanks ins advance!

Reply via email to