javascript - Disable Next Page button until all radio button groups have been answered -


I have not been responded to all the three groups of radio buttons, as long as a "Next section" button is disabled I'm trying to find out. I've searched for the length of the solution, but most are when a form is submitted. I am trying to configure it so that buttons are enabled when all questions are answered.

There are three panels on this page, only one is visible at a time. When the panel appears one, the panel two and three are hidden, once the answer on all the questions on the panel, the user clicks on the "Next Section" button, which slides up one by one, and the section two Slides. The problem I am facing is the verification ... make sure that all questions are answered on each panel before enabling the button.

I have a very brief version of what I'm working with:

  Q1 < div id = "one" & gt; & Lt; Input type = "radio" name = "question1" value = "q1-a" & gt; & Lt; Input type = "radio" name = "question 101" value = "q1-b" & gt; & Lt; Input type = "radio" name = "question" value = "q1-c" & gt; & Lt; / Div & gt; Q2 & lt; div id = "two" & gt; & Lt; Input type = "radio" name = "question 02" value = "q2-a" & gt; & Lt; Input type = "radio" name = "question 02" value = "q2-b" & gt; & Lt; Input type = "radio" name = "question 02" value = "q2-c" & gt; & Lt; / Div & gt; Q3 & lt; Div id = "three" & gt; & Lt; Input type = "radio" name = "question 03" value = "q3-A" & gt; & Lt; Input type = "radio" name = "question 03" value = "q3-b" & gt; & Lt; Input type = "radio" name = "question 03" value = "q3-c" & gt; & Lt; / Div & gt; & Lt; Button class = "BTN BTN-Primary" type = "button" id = "plus1" disabled = "true" & gt; Next section & lt; / Button & gt; $ {Document} .ready (function () {var = q01 = $ ('input [name = question01]') var q02 = $ ('input [name = question02]'); var q03 = $ ('input [ Name = Question03] '); Valid (); $ (q01, q02, q03) .change (valid);}); Validate the function () (if ($ (q01) .is (': check') & amp; amp; $ amp; $ (q02) .This (': check') & amp; amp; $ (q03). Prop ("disabled", true) ($ '.btn # deposit1') .pr ("disabled", incorrect);} and {$ (".btn # submit1"). ;}}    

I think this is what you need:

code> $ (q01, q02, q03) .change (valid); is not a valid way to select three jQuery elements .

You can use the function to select multiple jQuery variables ()

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -