There are multiple Bootstrap Modals in my page and all of them are triggered with jQuery. Currently I am initializing each of them like this
var modalOne = new bootstrap.Modal(document.getElementById('modalOne'));
var modalTwo = new bootstrap.Modal(document.getElementById('modalTwo'));
var modalThree = new bootstrap.Modal(document.getElementById('modalThree'));
var modalFour = new bootstrap.Modal(document.getElementById('modalFour'));
...
Is there any way to initialize all of them at once with a common class or something and show the particular modal when its required?