Are you the one who asked this same question on learningjquery.com? If so, please take a look at my answer there:

http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list

Thanks,

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 29, 2008, at 11:07 PM, pab wrote:


$(document).ready(function(){

        $(".accordion h2:first").addClass("active");
        $(".accordion p:not(:first)").hide();

        $(".accordion h2").click(function(){

          $(this).next("p").slideToggle("slow")
          .siblings("p:visible").slideUp("slow");
          $(this).toggleClass("active");
          $(this).siblings("h2").removeClass("active");

        });

});



accordion doesn't work with more than one paragraph per heading
if any heading has more then one paragraph it will only display one of
them, i tried giving them classes, that didn't work...came close but
no go....


if anyone can help that would be great.


* ONE WAY I MADE THIS WORK IS WITH BR TAGS...WHICH ARE A BIG NONO.
also br tags don't help oif you have an image ..so yeah

thanks

Reply via email to