A
A
Andrew2014-02-17 01:31:38
JavaScript
Andrew, 2014-02-17 01:31:38

Bootstrap: how to make popover work in a modal window?

There is a form in a modal window which is loaded from the server. I want to make a pop-up popover on focus on one field. Outside of the modal, things are quite simple - data- attributes and $("*").popover() at the top of the page. In the modal, I did $("*").popover() again at the beginning, but the popover still doesn't work. Although in general JS works there, and so does jQuery. I tried via chrome console but still doesn't work.
Question, actually: how to force popover to work in such conditions?

<input type="tel" class="form-control" id="phone" name="phone" placeholder="Телефон" data-container="body" data-toggle="popover" data-trigger="manual" data-placement="top" data-content="Номер телефона в формате (123)456-7890" />

$("#modal-callback input").popover();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2014-02-17
@SkaN2412

data-container="body"
this is redundant in this case, it worked without it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question