Note that there are some explanatory texts on larger screens.

plurals
  1. POunderstanding click(),change() and inputs scopes
    primarykey
    data
    text
    <p>I am trying to understand scope as far as inputs and clicks or checks are concerned. I am working on a project and what I am trying to do is. Ask if they work out a lot, they will answer yes or no. then I will ask them 3 question either way. I will ask how much they can bench, how much they can squat, how much they can curl. I have this part set up I will give them feedback based on what they input. What I am trying to do is add a check box to it for them to select if they are male or female. I think I should do it something like this</p> <pre><code>function one() { a = 100; b = 200; c = 300; return two(); function two() { a += a; b += b; c += c; return three(); function three() { a += 1; b += 1; c += 1; return four(); function four() { console.log(a, b, c); } } } } one() </code></pre> <p>I guess my question is how would I do this with click and checks and inputs. It seems no matter where I add the check box to what I have, it will not work for some reason. Either there will be a issue with the first question... Do you work out a lot? a the question will not be there. Or I will get a post era. I have a fiddle below. If someone would tell me how to make it work...or even better show me it working, I will be very thankful. I think this would help a lot of people out. I have seen a lot of good answers to this question on here, but no working examples. I think the most helpful thing for some people, is a working example they can see, I know it is for me.</p> <p>ps in my fiddle i am recycling the same inputs for the questions i'm asking. Whether they work out or not, i would like to do it properly, but not my main issue.</p> <p><a href="http://jsfiddle.net/vicky1212/G24aQ/10/" rel="nofollow">http://jsfiddle.net/vicky1212/G24aQ/10/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload