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

188
Vistas
Popover - placement option only work one time when all made i C#

I am trying to use Bootstrap popover where the popover is shown either at the top or the bottom, activated by mouseenter event. Works well the first time. When the popover is hidden, page scrolled down & popover reopened, the new placement should be altered based on the new position. But it fails to change the position. The popovers are made in C# producing this HTML code:


    Blah Blah Blah " data-original-title="Referanse">Blah

Works nice. Sorry for the BAD HTML code shown. It is not so important, and I am new to the forum. The HTML code seems not to be the problem. The problem is the positioning when the page is scrolled. It will place it based on this simple javascript mouseenter code:

// Place the popover based on the target client rect
// This method has a flaw, thus not implemented.
// The popover method has its method created in HTML only one time
// when it is shown for the first time. When it is hidden, then shown
// the placement option is not changed, regardless of below code. Need more
// investigation to resolve.
var popRect = e.target.getBoundingClientRect();
if (popRect.y < 150) {
    $(e.target).popover({ placement: "bottom" });
    console.log('bottom');
} else {
    $(e.target).popover({ placement: "top" });
    console.log('top');
}
$(e.target).popover('show');

It seems that the HTML popover insert are created only one time. Can anybody help with this issue?

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