Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8739127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:52:15+00:00 2026-06-13T10:52:15+00:00

I am trying to hide all other popovers when a new popover is selected

  • 0

I am trying to hide all other popovers when a new popover is selected by doing the following:

My HTML

a.btn#requests(rel='popover',data-placement='bottom',data-original-title='<b>Requests</b>',data-content='My content goes here')

My Javascript

  $(function (){
    console.log('start');
    $('#requests').popover();
    $('#messages').popover();

  });

  //This doesn't work for some reason?
  $('#requests').on('show', function (e) {
    console.log('requests');
    $('#messages').popover('hide');
  });

  $('#messages').on('show', function () {
    console.log('messages');
    $('#requests').popover('hide');
  });

However, my console.log(‘requests’) and console.log(‘messages’); is never getting shown even though the requests and messages popovers are showing, what am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:52:15+00:00Added an answer on June 13, 2026 at 10:52 am

    The popover plugin doesn’t trigger any event. Neither does the tooltip plugin (since popover extends tooltip). Check this issue (github) for alternatives.

    You can use different JS events depending on your trigger. For your example : Demo (jsfiddle)

    $(function (){
        console.log('start');
        $('#requests').popover();
        $('#messages').popover();
    
        $('#requests').on('click', function (e) {
            console.log('requests');
            $('#messages').popover('hide');
        });
    
        $('#messages').on('click', function () {
            console.log('messages');
            $('#requests').popover('hide');
        });
    
    });
    

    Why 'click' ? Because the default popover trigger for version 2.1.1 is click. See the popover doc (github)

    You can use the following events :

    • trigger: 'click' : on click
    • trigger: 'hover' : display on mouseenter and hide on mouseleave
    • trigger: 'focus' : display on focus and hide on blur
    • trigger: 'manual' : use your own code to display and hide anyway
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to hide table view until all the data is loaded. I found
im trying to hide all the selected element on document ready, but only the
I am trying to hide all the label tags on my jQuery Mobile site
I'm trying to hide a div if certain value are selected in a drop
Im trying to hide all divs of a class apart from the first one
I'm trying to show a div AFTER all other animations have finished. The code
Disclaimer: I'm new to jQuery and js. I'm trying to hide parts of partials
I am trying to do the following using c# code: Hide some rows in
I am trying to make a drop down menu and want all other open
I have the following HTML code: <fieldset> <legend><span>Contact Details</span> <span class=edit1>Edit</span><span class=hide1>Hide</span></legend> <div> <!--content-->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.