2018-08-31 10:55:03 +00:00
|
|
|
const triggerModalEvent = () => {
|
|
|
|
|
2018-09-01 19:23:53 +00:00
|
|
|
const buttons = document.querySelectorAll(".modalTrigger");
|
|
|
|
|
|
|
|
buttons.forEach(btn => {
|
|
|
|
if (btn) {
|
|
|
|
btn.addEventListener('click', function(event) {
|
|
|
|
const btnId = btn.getAttribute('data-user-id')
|
|
|
|
$("#myModal"+`${btnId}`).modal('show');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
2018-08-31 10:55:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export { triggerModalEvent }
|