I have 7 questions long and I need to show a question every time. It should show 2 questions by clicking on the button and after filling more form on this I will submit it. I really can not understand how to do this. Any help please? ☺
" Questioner "class name and a toggle link that hides all the questions but shows the next question. The last question should be a submit button instead of the toggle link:
html:
& lt; Form action = "blob" & gt; & Lt; Div class = "questionholder" id = "question1" style = "display: block" & gt; Question 1: Blob & lt; Br> & Lt; Input name = "answer 1" & gt; & Lt; Br> & Lt; One onclick = "displayquestion (2)" & gt; Next & lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "questionee" id = "question2" style = "display: none" & gt; Question 2: Blob & lt; Br> & Lt; Input name = "answer 2" & gt; & Lt; Br> & Lt; An onclick = "displayquestion (3)" & gt; Next & lt; / A & gt; & Lt; / Div & gt; . . . & Lt; Div class = "questionholder" id = "question7" style = "display: none" & gt; Question 7: Blob & lt; Br> & Lt; Input name = "answer7" & gt; & Lt; Br> & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Div & gt; & Lt; / Form & gt;
jquery:
function display question (a) {$ (".clients"). Stop (). Hide (); $ ("#Q" + a) .stop () Show () .; }
No comments:
Post a Comment