I have a list of several thumbnails. On click thumbnail I'd like to slide up
a div elsewhere on the page that has an id of the same name as the image id.

The first div (one) is shown as default. The other divs are hidden untill a
thumbnail is clicked. Then the div with the same id as thumbnail slides up
and shows and the first one is hidden and so on.

See example html below.

Jquery code so far

$(document).ready(function(){
                                                           
        //hide the all div except first one
        $('.slierwrap:not(:first)').hide();
        
        //when the anchor is clicked content gets slided
        $("#section1").click(function(event) {
        var element = $(this);

       $('.sliderwrap').slideUp("slow");
       
     this is where I'm stuck. Im not sure how to go about getting  the img
id  and assigning to element (this)   to get the div with same name as img
id to slide.

Help please.




<div id ="section1">
<ul>
<li> largeimagepath  thumbnailpath  </li>

<li> largeimagepath  thumbnailpath  </li>
</ul>
</div>

<div id = "sliderwrap">
<div id ="one">some text</div>
<div id ="two">some text</div>
</div>
-- 
View this message in context: 
http://www.nabble.com/get-img-id-and-slide-up-div-with-same-name-tp22363227s27240p22363227.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to