Answer the question
In order to leave comments, you need to log in
Bootstrap 3: is it possible to load only a part of the page into the modal window, for example from a block?
The situation is as follows:
- There are several buttons to call the modal window:
<a href="#myModal" data-toggle="modal" data-load-remote="/shop/items/item.html" data-remote-target="#myModal .modal-body">Ссылка 1</a>
$('[data-load-remote]').on('click',function(e) {
e.preventDefault();
var $this = $(this);
var remote = $this.data('load-remote');
if(remote) {
$($this.data('remote-target')).load(remote);
}
});
<div id="content"></div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question