Closed neezcha closed 3 years ago
Oct. 20
Oct. 20 GOT RADIO BUTTONS WORKING
var radioAM = document.querySelector("input[name='Peak'][value='AM']");
var radioPM = document.querySelector("input[name='Peak'][value='PM']");
radioAM.addEventListener('change', function(){
changeRoads();
});
radioPM.addEventListener('change', function(){
changeRoads();
});
function changeRoads(){
let oRoad = oahuRoads.options[oahuRoads.selectedIndex].value;
let oPeak = document.querySelector("input[name=Peak]:checked").value;
...
}
Supervisor recommended changing from charts.js to highcharts.js because he found a jFiddle example using responsive radio buttons. The example was responsive because it was in the demo environment jFiddle and does not work local hosting.
Currently, AM/PM is toggled by a selector element, change this to a button element to see if he prefers that. Radio button still does not an automatic listener.