A simple script is not working inside a bootstrap modal. I googled and came up with this:
JS:
$('#exampleModal').on('shown.bs.modal', function () {
const mouseWheel = document.querySelector('.modal-body');
mouseWheel.addEventListener('wheel', function(e) {
const race = 450; // How many pixels to scroll
if (e.deltaY > 0) // Scroll right
mouseWheel.scrollLeft += race;
else // Scroll left
mouseWheel.scrollLeft -= race;
e.preventDefault();
});
I took the script from here and here it works: https://codepen.io/fauzanmy/pen/dyprKRd In my case it doens't want to work, I just put the script before and thats it.
Any help would be nice :)