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

193
Views
Popover: la opción de ubicación solo funciona una vez cuando todo está hecho en C#

Estoy tratando de usar la ventana emergente Bootstrap donde la ventana emergente se muestra en la parte superior o inferior, activada por el evento mouseenter. Funciona bien la primera vez. Cuando la ventana emergente está oculta, la página se desplaza hacia abajo y la ventana emergente se vuelve a abrir, la nueva ubicación debe modificarse en función de la nueva posición. Pero no logra cambiar la posición. Los popovers están hechos en C# produciendo este código HTML:


    Bla, bla, bla " data-original-title="Referanse">Bla

Funciona bien. Lo siento por el código HTML MALO que se muestra. No es tan importante, y soy nuevo en el foro. El código HTML parece no ser el problema. El problema es el posicionamiento cuando se desplaza la página. Lo colocará en función de este simple código javascript mouseenter:

 // 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');

Parece que la inserción emergente de HTML se crea solo una vez. ¿Alguien puede ayudar con este problema?

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!