How to use the bootstrap.Modal function in bootstrap

To help you get started, we’ve selected a few bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robotichead / NearBeach / src / js / components / requirements / NewRequirement.vue View on Github external
}).catch((error) => {
                        // Get the error modal
                        var elem_cont = document.getElementById("errorModalContent");

                        // Update the content
                        elem_cont.innerHTML = `<strong>HTML ISSUE:</strong> We could not save the new requirement<hr>${error}`;

                        // Show the modal
                        //var errorModal = new bootstrap.Modal(document.getElementById('errorModal'));
                        var errorModal = new Modal(document.getElementById('errorModal'));
                        errorModal.show();

                        // Hide the loader
                        loader_elem.style.transform = "translateY(-100vh)";
                    });
            },
github robotichead / NearBeach / src / js / components / organisations / GetStakeholders.vue View on Github external
}).catch(function (error) {
                    // Get the error modal
                    var elem_cont = document.getElementById("errorModalContent");

                    // Update the content
                    elem_cont.innerHTML = `<strong>Search Organisation Issue:</strong><br>${error}`;

                    // Show the modal
                    var errorModal = new bootstrap.Modal(document.getElementById('errorModal'), {
                      keyboard: false
                    })
                    errorModal.show();

                    // Hide the loader
                    var loader_element = document.getElementById("loader");
                    loader_element.style.display = "none";
                });
            },