私はjquery selectboxを使用しています.最初の質問を取得して、一連の質問の最後に表示されるリンクを決定しようとしています. ユーザーが最初の回答を選択すると最初のリンクに移動し、回答 2 を選択すると 2 番目のリンクに移動します。
<div class="step question">
<h2>Select An Answer</h2>
<div id="q1_one" class="button button_green next">Answer 1</div>
<div id="q1_two" class="button button_red next">Answer 2</div>
<div id="q1_three" class="button button_red next">Answer 3</div>
</div>
そして、ここに私が表示しようとしている一連の回答があります。現在、質問1でどの回答が選択されていても、それらはすべて表示されます。選択ごとに1つの正しい回答を表示しようとしています:
<div id="if_one">
<a href="http://websitelinkhere.com/1" class="button_primary agree">If Question 1 = Answer 1</a>
</div>
<div id="if_two">
<a href="http://websitelinkhere.com/2" class="button_primary agree">If Question 1 = Answer 2</a>
</div>
<div id="if_three">
<a href="http://websitelinkhere.com/3" class="button_primary agree">If Question 1 = Answer 3</a>
</div>