Forums

Give help. Get help.

  • # December 22, 2008 at 4:13 pm

    Website: http://stuckpixelstudio.com/clients/cro … stries.php

    So what I’m going for is when you click on a header with the class ".ministriestitle" , the contents in a paragraph with the class ".ministrydetail" slides down, and when you click it again it slides back up. I was able to make this work fine, but whenever you would click on one of the headers, ALL of the paragraphs would show. So, by referencing my "Learning jQuery" book, I tried to combine some (function(event) stuff with my .toggle thing, but I can’t seem to get it to work. I dunno if I’m missing a parenthesis or a bracket, or if there is something wrong with how I’m doing this. So, here’s the code:

    Code:
    $(document).ready(function()
    $(‘.ministriestitle’).toggle(function(event) {
    if (event.target == this) {
    $(‘.ministrydetail’).slideDown(‘fast’);
    }, function() {
    $(‘.ministrydetail’).slideUp(‘fast’);
    }
    });
    });

    Thanks guys.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag