I almost have this working, check it out:

 I was able to use an alert to show the id of what was clicked! But Im
trying to show/hide elements based on what is clicked.

So for example, if you click link 1 (id="1") - all div's with id="1"
will show, but div's with id="2" will be hidden. I can get everything
to show, but not just id="1".

Here is my code, what am I doing wrong?

$(event.target.id)show(); $(event.target.id:not).hide();

Here is the full code:

        //grab values from attributes assigned in xsl
        var qtID = $(this).attr("id");

        // make id to show comment (#23453-3djis-im37vk9-fkifhf7)
        var ccID = '#' + qtID;


        //show only comments of matching ccID that were clicked
        $("#item-comments-listing").show();
        $(event.target.id)show();
        $(event.target.id:not).hide();

Any ideas?

On Nov 19, 1:16 pm, "Paul Collins" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm trying to find a reference here and having troubles. Would really
> appreciate if someone can point me to a tutorial.
>
> Basically, I have a list of anchored links that point to content with
> matching ID's on the same page. With Javascript on, I want to hide all
> except the first when you come into the page, then when people click
> on a link it would show the matching ID.
>
> I guess the JQuery would grab the anchored links and put them in an
> array when the page loads? Maybe it doesn't need to be that complex.
> Any help would be great.
>
> An example of the code:
>
> <!--anchored links-->
>         <ul id="anchoredLinks">
>                 <li><a href="#architects">Architects</a></li>
>                 <li><a href="#designers"><strong>Designers</strong></a></li>  
>                     
>         </ul>
> <!--content to show and hide-->
>         <div id="architects">
>                 blah, blah, blah                                              
>   
>         </div>
>         <div id="designers">
>                 blah, blah, blah                                              
>   
>         </div>            
>
> Thanks for any help.

Reply via email to