[jQuery] Re: reset toggle

2007-11-26 Thread Wizzud
You could try something like (untested)... $('div.textcontainer_questions li a').click(function(){ var num = $(this).attr('class').match(/question(\d+)/)[1] , ans = $('div.answer'+num); ans.siblings(':visible:has(div)').fadeOut(); ans[ ans.is(':visible') ? 'fadeOut' : 'fadeIn'

[jQuery] Re: reset toggle

2007-11-26 Thread befidled
It is a FAQ page but handled a little differently: http://www.safaribydesign.com/faq/ The way I've got it set up right now works ok, but once a visitor starts clicking they can't turn the answers off unless they click the FAQ button in the main menu. That may not be much of a problem but I'd lik

[jQuery] Re: reset toggle

2007-11-25 Thread Glen Lipka
Are you trying to do something like this? http://www.commadot.com/jquery/faq.php I can think of a few ways to make your code more jQuery-ish. Glen On Nov 25, 2007 6:00 PM, befidled <[EMAIL PROTECTED]> wrote: > > I've currently got a list where each list element fades in a > corresponding div wh