[jQuery] How to select sub element text on clicking the parent element.

2009-04-17 Thread Kapse

Hi,

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

div id=questions-page
   div id=question
   pquestion1/p
ul
 lianswer1/li
/ul
   /div

   div id=question
pquestion2/p
 ul
  lianswer2/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


[jQuery] How can i access iframe content... and manupulate the elements from jquery script from parent ?

2009-04-17 Thread Kapse

Need help!!

How can i access iframe content... and manupulate the elements from
jquery script from parent ?

any ideas... ??