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

121
Vistas
Smooth Zoom Pan - jQuery Image Viewer on a dynamically loaded picture

I'm trying to apply Smooth Zoom Pan on a dynamically loaded picture like this:

  <div id="imgDiv" class="img-fluid"></div>
  function createImg() {
        var div = $("#imgDiv");
        div.empty();
        var newImg = new Image();
        newImg.id = 'myImg';
        newImg.useMap = '#buildingMap'
        newImg.setAttribute('class', 'img-fluid');
        newImg.attr("src", 'data:image/jpg;base64, ' + imgContent);
        div.append(newImg);
   }

imgContent is Base64 content of the image that I'm get it from database with AJAX call.

After the image was created:

setTimeout(function () {
    $('#myImg').smoothZoom({
        width: 500,
        height: 500
    });
   }, 500);

As a result, I'm getting only a white empty div with borders

Any suggestions how to fix this?

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