I wrote this basic website, but the transition between the tabs from the browser of the phone seems sluggish. (On the other hand, the same page works good enough on my desktop). What can I do in order to improve this?
Script:
function showPanel(panelIndex, colorCode) {
tabButtons.forEach(function (node) {
node.style.backgroundColor = "";
node.style.color = "";
});
tabButtons[panelIndex].style.backgroundColor = colorCode;
tabButtons[panelIndex].style.color = "white";
tabPanels.forEach(function (node) {
node.style.display = "none";
});
tabPanels[panelIndex].style.display = "block";
tabPanels[panelIndex].style.backgroundColor = colorCode;
}
Aucun commentaire:
Enregistrer un commentaire