Answers for "popup modal html"

0

modal pop up html css

<button class="trigger">Click here to trigger the modal!</button>
    <div class="modal">
        <div class="modal-content">
            <span class="close-button">×</span>
            <h1>Hello, I am a modal!</h1>
        </div>
    </div>
Posted by: Guest on February-18-2021
0

modal pop up html css

var modal = document.querySelector(".modal");
    var trigger = document.querySelector(".trigger");
    var closeButton = document.querySelector(".close-button");

    function toggleModal() {
        modal.classList.toggle("show-modal");
    }

    function windowOnClick(event) {
        if (event.target === modal) {
            toggleModal();
        }
    }

    trigger.addEventListener("click", toggleModal);
    closeButton.addEventListener("click", toggleModal);
    window.addEventListener("click", windowOnClick);
Posted by: Guest on February-18-2021
1

bootstrap modals

<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">×</span>
        </button>
      </div>
      <div class="modal-body">
        <p>Modal body text goes here.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary">Save changes</button>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
Posted by: Guest on May-08-2020
0

how to make popup modal in jquery with example

$("#sticky").modal({
  escapeClose: false,
  clickClose: false,
  showClose: false
});
Posted by: Guest on October-10-2020
0

como criar uma modal jquery

var modal_estilos = 'display: block;'
+'width: 85%; max-width: 600px;'
+'background: #fff; padding: 15px;'
+'border-radius: 5px;'
+'-webkit-box-shadow: 0px 6px 14px -2px rgba(0,0,0,0.75);'
+'-moz-box-shadow: 0px 6px 14px -2px rgba(0,0,0,0.75);'
+'box-shadow: 0px 6px 14px -2px rgba(0,0,0,0.75);'
+'position: fixed;'
+'top: 50%; left: 50%;'
+'transform: translate(-50%,-50%);'
+'z-index: 99999999; text-align: center';

var fundo_modal_estilos = 'top: 0; right: 0;'
+'bottom: 0; left: 0; position: fixed;'
+'background-color: rgba(0, 0, 0, 0.6); z-index: 99999999;'
+'display: none;';

var meu_modal = '<div id="fundo_modal" style="'+fundo_modal_estilos+'">'
+'<div id="meu_modal" style="'+modal_estilos+'">'
   +'<h5>Esqueceu sua senha?</h5><br />'
      +'<form>'
         +'<div class="row">'
            +'<div class="col-sm-6">'
               +'<div class="form-group">'
                  +'<input name="cpf_cnpj" class="form-control" type="tel" placeholder="CPF/CNPJ" />'
               +'</div>'
               +'<div class="form-group">'
                  +'<input name="email" style="max-width: 55%; float: left;" class="form-control" type="email" placeholder="Email" />'
                  +'<button style="float: left; margin-left: 15px;" type="submit" class="btn btn-secondary">Enviar</button>'
               +'</div>'
            +'</div>'
            +'<div class="col-sm-6" style="text-align: left;">'
               +'Qualquer coisa aqui nesta coluna'
            +'</div>'
         +'</div>'
      +'</form>'
   +'<button type="button" class="close" style="top: 5px; right: 10px; position: absolute; cursor: pointer;"><span>×</span></button>'
+'</div></div>';

$("body").append(meu_modal);

$("#fundo_modal, .close").click(function(){ $("#fundo_modal").hide(); });
$("#meu_modal").click(function(e){ e.stopPropagation(); });
Posted by: Guest on May-01-2020

Browse Popular Code Answers by Language