Window when you click the html button

1

Hello, and I'm creating an area on my site, where when the person clicked on "show more" would open a window on the site itself, showing the content as in the image below, but I have no idea how to do it, could you help me?

    
asked by anonymous 10.01.2018 / 20:28

1 answer

2

An example of functional modal:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><!--LatestcompiledandminifiedCSS--><linkrel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script><!--Buttontriggermodal--><buttontype="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
      Mostrar mais
    </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-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Modal title</h4>
          </div>
          <div class="modal-body">
           // Aqui você irá colocar os códigos html que vão preencher o corpo do seu modal
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>
        </div>
      </div>
    </div>

For css I used the bootstrap because it already contains ready-made classes, but you can use any other class for styles.

    
10.01.2018 / 20:31