Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
Script inside of bootstrap modal not working

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 :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!