Skip to content

Commit

Permalink
final changes...i promise :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codexgrey committed Jan 12, 2024
1 parent 7c09666 commit e1fd6bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2>
</h2> <br>
Participants have the option to register as <br>
<span>Speaker</span> or member of the <span>Audience</span> <br>
with differing charges.
with differing prices.
<br><br>
Also on offer are special <em>all access</em> packages for each session,
as well as <em>discounts</em> of <em>%15</em> for attending more than <em>two(2)</em>
Expand Down
2 changes: 1 addition & 1 deletion registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2>
</h2> <br>
Participants have the option to register as <br>
<span>Speaker</span> or member of the <span>Audience</span> <br>
with differing charges.
with differing prices.
<br><br>
Also on offer are special <em>all access</em> packages for each session,
as well as <em>discounts</em> of <em>%15</em> for attending more than <em>two(2)</em>
Expand Down
12 changes: 6 additions & 6 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ function getCost() {


// looping through input to find radio buttons, then get their values
/* if; charge > 100;
/* if; price > 100;
user opted for all access package on a session, so no cost by days.
else if; charge <= to 100;
else if; price <= to 100;
user has paid for limited access package on a session, so "cost = cost * days"
*/
for (i = 0; i < elem.length; i++) {
if (elem[i].type == "radio" && elem[i].checked) {
let charge = parseInt(elem[i].value);
let price = parseInt(elem[i].value);
count++;

if (charge > 100)
cost += charge; // session package = All access
if (price > 100)
cost += price; // session package = All access
else
cost += getDays() * charge; // session package = Limited access
cost += getDays() * price; // session package = Limited access
}
};

Expand Down

0 comments on commit e1fd6bc

Please sign in to comment.