06-30-2010, 11:26 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Jan 2008
Posts: 119
Thanks: 21
|
Decision Tree / Drill Down
Hello all, I have been working on a drill down menu / decision tree for a bit here with jQuery. I had an easy nice setup done, but it doesn't work the way I'd like it to 100%.
In any case. I am trying to just step through a list. For example:
HTML Code:
<h3>Is the Sky Blue?</h3>
<ul>
<li>YES
<ul><li>What color of blue?</li></ul></li>
<li>NO
<ul><li>If not blue, what color is it?</li></ul></li>
</ul>
When someone clicks on Yes, show the Next LI, if they click on No, show the next LI.
I have been trying, with jQuery something like this:
Code:
$('h3').click(function(){
$(this).next('li').toggle('fast');
});
or
Code:
$('h3').click(function(){
$('li',this).show();
});
...but cannot get just the next li to show. Any advice? 
|
|
|
|