Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap, tooltip with dropdown, in button group seems to have an effect

In bootstrap, tooltip with dropdown, the hover data-toggle attached to one button in a button group seems to have an effect when I hover mouse on the button that is responsible for tool tip then it also adjust its position that does not look good. Please help me.

Here is my code:-

<html>
<head>
<meta charset="UTF-8">    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap.css" rel="stylesheet" media="screen"/>
    <link href="css/bootstrap-responsive.css" rel="stylesheet" media="screen"/>
</head>
<body>
  <div class="btn-group">
      <a href="#" class="btn btn-small btn-inverse add1" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Add to Selected Contacts">Add</a>
      <a class="btn  btn-inverse dropdown-toggle" data-toggle="dropdown" href="#">
          <span class="caret"></span>
      </a>
 <a href="#" class="btn btn-small btn-inverse add1" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Add to Selected Contacts">Add</a>
 <a class="btn  btn-inverse dropdown-toggle" data-toggle="dropdown" href="#">
          <span class="caret"></span>
   </a>
 </div>                                            
<script type="text/javascript" src="js/jQuery v1.9.1.js"></script>
  <script type="text/javascript" src="js/bootstrap.js"></script>
   <script type="text/javascript">
    // tooltip demo
    $('.add1').tooltip()
  </script>                               
</body>
</html>
like image 790
gaurav Avatar asked Aug 28 '13 12:08

gaurav


People also ask

How do I change dynamic value tooltip?

Drag the calculated field to the appropriate tooltip and you'll see an ATTR dimension pill with a tooltip logo in the Marks card. Insert the ATTR budget and adjusted inflated gross calculated fields into its corresponding tooltip as seen in Image 6. After that, you're dynamic tooltip should work!

Are Bootstrap tooltips accessible?

Bootstrap's interactive components—such as modal dialogs, dropdown menus and custom tooltips—are designed to work for touch, mouse and keyboard users.

Why dropdown Bootstrap is not working?

Why is my drop down menu not working in bootstrap? Solution : The dropdown should be toggled via data attributes or using javascript. In the above program, we have forgotten to add a data attribute so the dropdown is not working. So add data-bs-toggle="dropdown" to toggle the dropdown.

How do you hover in dropdown?

Example Explained Use any element to open the dropdown menu, e.g. a <button>, <a> or <p> element. Use a container element (like <div>) to create the dropdown menu and add the dropdown links inside it. Wrap a <div> element around the button and the <div> to position the dropdown menu correctly with CSS.


1 Answers

Try adding the container: 'body' option. This will append the tooltip to the body instead of within the buttons container.

$('.add1').tooltip({
    container: 'body'
})
like image 196
Schmalzy Avatar answered Oct 21 '22 08:10

Schmalzy