I have a jquery code which enables a user to select amount of money they wish to borrow and how long they would like to pay it back.
What I need to do is display the results in grid like table so that if a user wants to borrow $200 for 30days, they can pay 200/30 =$6.66 per day, so the grid would have day 1: 6.66, day 2: 6.66, day 3: 6.66 …… up to day 30.
I have tried using iteration
created a variable called days
for( var i=i; i<days; i++) {
//display days and amount
}
Any help?
Why display the amount everyday if it is the same amount?
Because there is a slider somewhere in the code and the user can vary the amount and dates to see what their repayments would be on daily basis, it is part of a larger code
Here is something to start with, just expand from here:
HTML:
CSS:
JS:
Part of the code c/0 @Alex Ball’s suggestion, so give him a credit.
See code in action here: http://jsfiddle.net/DHYHx/