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

146
Vistas
How to disable bootstrap popover on tap in mobile device

I am getting one major issue of bootstrap popover, it's working fine in desktop but not in mobile, When I tap on button which has pophover it's opening tooltip at first tap and firing event on second tap.

In sort : bootstrap popover not firing event in one tap in mobile device, It's showing tool-tip instead.

I want to get it disabled on mobile devices, or fire event with tooltip.

Let me show codes:

HTML

<div class="container">
  <h3>Popover Example</h3>
  <a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-content="Some content" class="">Hover over me</a>
</div>

JavaScript

$('[data-toggle="popover"]').popover();   
    $('[data-toggle="popover"]').click(function(){
        alert("I am clicked");
})

What I tried

var win = $(window).width();
   if(win<767) {
      $('[data-toggle="popover"]').removeAttr('data-toggle');
      // Or something like this disable popover
      $('[data-toggle="popover"]').popoverDisabled();
    }

So, Is there any function or attributes which can fix this, any help/suggestion would be appreciate.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

This will work: $('.className').popover('disable');

Any for mobile only, for example:

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
        $('.className').popover('disable');
}
over 4 years ago · Santiago Trujillo Denunciar

0

First Check Mobile Version run this function :-

detectmob();
function detectmob() {
   if(window.innerWidth <= 800 && window.innerHeight <= 600) {
     $('[data-toggle="popover"]').popover("hide");
   } else {
     return false;
   }
}
over 4 years ago · Santiago Trujillo Denunciar
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