Open modal from JS

-1

I'm doing a query which generates certain information, implement a Modal. to see more info or something like that. The problem esque generated a lot of HTML code. how can I do it so that when I click on the button see more info send me to call the modal And I will load the rest of the info, reusing a single Modal.

    
asked by Alex Burke Cooper 15.10.2017 в 12:35
source

1 answer

-1

Using the Bootstrap modal.

<!-- Button trigger modal -->
<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="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>

More information on the Bootsrap page.

    
answered by 16.10.2017 / 14:35
source