I have this code Math.min(someVariable, 500)) I also have some divs which I have hidden(display:none) My question is: How can I use the code above in correlation with the Jquery event 'show'? I know how the event works but I dont know how to put two and two together.
So the 'show' event should show 'someVariable' or 500 of the divs.
someVariable is a number (from 0 to a billion)
I would need more information to solve your specific example, but let me try filling in some details for a more concrete solution.
I am going to assume you have a bunch of divs with ids like: “fieldDiv1”, “fieldDiv2”, etc that are all potentially hidden. And you have a bunch of
<input type="text">fields containing your ‘someVariable’ numbers, and these have ids like: “fieldValue1”, “fieldValue2”, etc. So, in javascript you could call the following function to solve your problem:I know I had to assume a lot there, but I hope that helps.