Hi,

I am newbie to the jquery. Please let me know, how i can do this.

<div id="questions-page">
   <div id="question">
   <p>question1</p>
    <ul>
     <li>answer1</li>
    </ul>
   </div>

   <div id="question">
    <p>question2</p>
     <ul>
      <li>answer2</li>
     </ul>
   </div>
</div>

The question is.. Onclicking "question1", I should popup "answer1".

<code>
<script>
        window.onload = function() {
        $("#questions-page #questions p").click(function(){
           text=""; // I want here to get the value of answer.
            alert('answer is'+text);
        });
        };
</script>
</code>

Reply via email to