Dynamic forms

All forms now generated from a single function. Huge reduction in code and easier to make global changes.
This commit is contained in:
lawgicau
2021-07-14 17:35:30 +10:00
parent a4eadd10b6
commit 8707323b18
5 changed files with 343 additions and 556 deletions

View File

@ -1,6 +1,7 @@
var pages = ["Home", "Calibration", "Troubleshooting", "Upgrade Guides", "Review Policy", "Sponsors", "Contact"]
var urls = ["index.html", "calibration.html", "troubleshooting.html", "upgrades.html", "reviewpolicy.html", "sponsors.html", "contact.html"]
var menu = '<img src="img/ttwhite.png" />';
var tab;
for(var i = 0; i < pages.length; i++){
menu += '<a href="'+urls[i]+'" target="_self"';
if(pages[i] == pageName){
@ -60,4 +61,5 @@ $(document).ready(function(){
$(window).resize(function(){
sizeBody();
});
tab = $(location).attr('hash');
});