How can I make a div show or hide based on a form inputs value. Specifically if It’s value is positive. I want it to show one div. Otherwise I want it to show another div.
Here is the more complex thing that I actually want
. If form1 is greater than 10,000 and form2 is less than zero. Show this first div(if both are met). If condition for form 1 is met and form two is not met(form 2 is a positive number) show this second div.If anything else(neither are met or form 1 not met(9000) but form two is(a negative number) show this third div
Lets assume you have the following to divs:
And the following input you want to be watching:
Then the following Javascript would do it for you (you would require jquery for this to work):
This would also work with any other type of selector (eg by id, by element type, etc)