CODE HERE: <http://jsfiddle.net/B7Y43/>
---------------------------------------

Hello fello programmers,

I have the following situation:

**My PHP-script generates multiple DIV's, containing:**

* A question (with a class that is either mainQuestion or subQuestionOf[questionID])
* A button
* A paragraph containing the answer

**I am trying to achieve the following:**

When the user clicks the button next to the question, the answer AND the subquestions should fadeIn. I have already managed to fadeIn the answer when the user clicks the button, using `$(this).next('p').fadeIn("fast");`
 but since the subQuestions are rarely the next div, I think I need the use parameters.

So in pseudo-code:

```
<question id="1" subquestionOf=""><button>
<answer>
<question id="2" subquestionOf="1"><button>
<answer>
<question id="3" subquestionOf="1"><button>
<answer>

if user clicks button {
show answer;
show questions where subquestionof=parent.id;
}

```

I have no idea how to use parameters, I tried getting the ID of the button's parent div with no luck:

```
$(function getID(event){
            var id = $(this).parent().attr("id");
            alert(id);
    });

```

Alert shows: "Undefined"