0
Calculator removing values
I want the Calculator to remove "Value 2"when "sqrt" is selected and place it back when "add" "sub" "mul" or "div" are selected. https://code.sololearn.com/WTFyM95eGJw6/?ref=app https://code.sololearn.com/WTFyM95eGJw6/?ref=app
1 Antwort
+ 1
if you want show or hide the second input field, on the change of the dropdown. then the calc() function will not work, because calc() function is called when you click on calculate button. so u can create a new event handler onchange upon the select dropdown , which will trigger a function, whenever you change the value of seelct field..
and since you are using jquery u can use hide() and show() method..
see the code below
https://code.sololearn.com/WxJBP8B2sOwH/?ref=app