I'm new to jquery as well. But I'm wondering if something like this wouldn't work.
$(function() { $(".evname a").click(function() { $(this.hash).slideToggle(500); return false; }); }); You would, of course, have to add an anchor tag in your form. But that would only help you with showing one. I'm using this as well and am able to get my hidden to slide open. But since you want to go through all of them I would there would need to be the need to retreive all of the elements, determine which one is being clicked, then apply the action to that particular click event. On Oct 1, 12:16 pm, andrewsquidge <[EMAIL PROTECTED]> wrote: > Hi guys, > > I've been trying to get this literally all day! I just can't work it out. > > I've got this HTML: > <ul> > <li class="evname"> 1 This is the event name </li> > <li class="evsum">some text here</li> > </ul> > > On click of <li class="evname"> the li beneath should reveal. But because > there are many of these ona page and they will be dynamic I need to set it > to reveal only the relevant one. > > So my plan was to reveal the relevant <li class="evsum"> in order. Here's > the jquery: > > $(document).ready(function() { > > $("li.evname").click(function() { > var id = this.id.replace('show_', ""); > $("#eventlist li.evsum:eq("+id+")").slideToggle(); > }); > > }); > > But I'm getting nothing. Even when I replace the action (slideToggle) with > an alert(id) I just get an alert saying "This website says:" and no id! I'm > stumped! > > PLEASE, please please can someone help me out! > > Thanks in advance. > Andy > -- > View this message in > context:http://www.nabble.com/Passing-a-variable-to-a-function-tp19765153s272... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.