I have a series of divs, each has a "dropdown" type
div that remains hidden, until you click an image in
another div (these buttons are for things like
screenshots, info, etc). 

Here's the page I'm working on:
http://www.anime-planet.com/newsite/anirec/45.html

By default, these dropdown divs should be hidden (they
aren't now, so I can test). When you click the reviews
image, a currently exposed dropdown for that series
entry should slidetoggle (to hide itself), and the
clicked image's div should slidetoggle (to expose
itself). So what it would look like is that the
currently-showing div slides up, and the "new" one
slides down with the information you requested via the
button. The same thing should happen if you click any
other image for that series entry.

The first code I tried worked for all divs on the
page:

$('div.anirec_buttons img').click(function() {
                                $('.anirec_more').slideToggle(400);
        return false;
});

This correctly slidetoggle's all dropdown divs on the
page, if any image is clicked.

But i need it to be more specific. I then tried this:

$('div.anirec_buttons img').click(function() {
        $('img#reviews').click(function(){
                                        $('.anirec_more').slideToggle(400);
        return false;
        });*/
        return false;
});

I had figured this would first check if any image had
been clicked, then would do things depending on WHICH
image was clicked. In this case, if the reviews image
is clicked, it would toggle everything. This code
doesn't work.

So I'm wondering if anyone knows:

1. How would I know which image inside the div was
clicked?

2. How would I write this so the only dropdowns that
would toggle, would be INSIDE THE DIV that contained
the clicked image? (as opposed to every series entry
on the page)

thanks in advance, sorry if this isn't specific
enough!
-kim


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to