polyglot/app/javascript/components/modal.js

12 lines
264 B
JavaScript

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