Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda