0

I have a problem in my modal bootstrap. I try to create a modal and within the modal create a modal popover. The result is that is open and not only opens when I click the button.

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
<div class="modal-body">
    <a href="#" role="button" class="btn btn-default popover-test" title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title" aria-describedby="popover64665">button</a>
    <div class="popover fade right in" role="tooltip" id="popover64665" style="top: 0px; left: 112px; display: block;">
        <div class="arrow" style="top: 50%;"></div>
        <h3 class="popover-title">A Title</h3>
        <div class="popover-content">And here's some amazing content. It's very engaging. right?</div>
    </div> 
</div>
</div>

My jsfidle

Jose Cerejo
  • 231
  • 1
  • 5
  • 19
  • See my answer to [How to open two modal dialogs in Twitter Bootstrap at the same time](http://stackoverflow.com/a/23304884/1366033) – KyleMit Dec 11 '15 at 21:04

1 Answers1

0

1) U need include jQuery.js and bootstrap.js + bootstrap.css

2) It gonna doesnt work without JS, so u need set up for example script.js

3) set it up in HTML <script src="script.js"></script>

4) In script.js type :

$('#myModal').on('shown.bs.modal', function () {
  $('#myInput').focus();
});

Hope it helps... CODEPEN.io

liborza
  • 969
  • 1
  • 7
  • 28