While working on a script for my job, I decided to move most of my HTML content into a modal halfway through writing the code. The challenge now is that many functions I've already created no longer work with the content inside the modal. I'm hoping to find a way to adjust my functions to work with the modal with minimal changes, but I'm worried I may end up having to rewrite everything.
Here is an excerpt of my code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Zoho Desk - Apps</title>
<style>
.hidden {
display: none;
}
// other CSS styles...
</style>
</head>
<body>
// some initial HTML elements...
// various JavaScript functions and event listeners...
<script src="./js/extension.js" charset="utf-8"></script>
</body>
</html>
I had to remove certain parts of my HTML for brevity, and I attempted to incorporate the JavaScript into my modal, which unfortunately caused issues. Despite exploring different approaches to rewriting the functions, I haven't found a solution that allows them to function properly within the modal.