Hi Lucien,
Welcome to the jQuery mailing list!
You're on the right track, but instead of doing this:
$("this.following-sibling").slideDown("slow");
try this:
$(this).next().slideDown("slow");
--Karl
_______________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 16, 2006, at 6:48 PM, Lucien Stals wrote:
> Hi everyone,
>
> (Yes, I'm a newbie to jQuery)
>
> I have the following in my page...
>
> $(document).ready(function()
> {
> $("div.singleEvent").hide();
>
> $("span.singleEventTitle").click(function()
> {
> $("div:hidden").slideDown("slow");
> return false;
> });
> });
>
> Now this works to hide all the "singleEvent" div, but what I want
> is to
> show (slideDown) the previously hidden body of an event when somebody
> clicks on the still visible event title. But I'm just not getting the
> expression language. How do I select the following sibling of the
> event
> title that was clicked so that not *all* of the hidden elements are
> show
> at once?
>
> I imagined it was something like...
>
> $("following-sibling").slideDown("slow");
> or
> $("this.following-sibling").slideDown("slow");
>
> But they just aren't working for me :(
>
>
> In the html, the events look something like...
>
> <span class="singleEventTitle">title</span>
> <div class="singleEvent">event details</div>
>
> --
>
> Lucien Stals
> Multimedia/Web Developer
> Academic Development and Support
> Swinburne University of Technology
> PO Box 218 Hawthorn, 3122, Australia
> email: [EMAIL PROTECTED]
> telephone: +61 3 9214 4474
> office: AD(s)223
>
>
> Education is only the beginning.
> Let's get on with it.
>
> Swinburne University of Technology
> CRICOS Provider Code: 00111D
>
> NOTICE
> This e-mail and any attachments are confidential and intended only
> for the use of the addressee. They may contain information that is
> privileged or protected by copyright. If you are not the intended
> recipient, any dissemination, distribution, printing, copying or
> use is strictly prohibited. The University does not warrant that
> this e-mail and any attachments are secure and there is also a risk
> that it may be corrupted in transmission. It is your responsibility
> to check any attachments for viruses or defects before opening
> them. If you have received this transmission in error, please
> contact us on +61 3 9214 8000 and delete it immediately from your
> system. We do not accept liability in connection with computer
> virus, data corruption, delay, interruption, unauthorised access or
> unauthorised amendment.
>
> Please consider the environment before printing this email.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/