Sorry, but your code is currently too complicated for me to debug without splitting the HTML, CSS and JS parts apart.
You might find some useful ideas in this existing topic, which combines HTML, CSS and JavaScript in one export script.
Sorry, but your code is currently too complicated for me to debug without splitting the HTML, CSS and JS parts apart.
You might find some useful ideas in this existing topic, which combines HTML, CSS and JavaScript in one export script.