Switch to unified view

a b/web/hiring/hiring-modal.js
1
document.addEventListener('DOMContentLoaded', function() {
2
    const modalContainer = document.querySelector('.modal-container');
3
    const closeModalButton = document.querySelector('.close-modal');
4
    const applicationForm = document.getElementById('application-form');
5
6
    // Function to open the modal
7
    function openModal() {
8
        modalContainer.classList.add('active');
9
    }
10
11
    // Function to close the modal
12
    function closeModal() {
13
        modalContainer.classList.remove('active');
14
    }
15
16
    // Event listener for close button
17
    closeModalButton.addEventListener('click', closeModal);
18
19
    // Event listener for form submission
20
    applicationForm.addEventListener('submit', function(event) {
21
        event.preventDefault();
22
        // Handle form submission logic here
23
        alert('Application submitted successfully!');
24
        closeModal();
25
    });
26
27
    // Open the modal when the page loads
28
    openModal();
29
});