polyglot/app/javascript/packs/modal.js

9 lines
208 B
JavaScript

import "bootstrap";
const btn = document.getElementById("modalTrigger");
const modal = document.getElementById("myModal");
btn.addEventListener('click', function(event) {
$('#myModal').modal('show');
});