Documentation

Everything you can do with Beauter


Modal Boxes


You can make Modal boxes with beauter to make responsive popups etc.

base
modalbox-modal
object
-close
modalbox-modal-content
<!-- The Modal -->
<div id="myModal1" class="modalbox-modal">

<!-- Modal content -->
<div class="modalbox-modal-content">
<span class="-close" id="modalbox-close1">✖</span>
<p>Here lies your modal!</p>
</div>
</div>

<script>
// Get the modal
var modal = document.getElementById('myModal1');

// Get the button that opens the modal
var btn = document.getElementById("myBtn1");

// Get the <span> element that closes the modal
var span = document.getElementById("modalbox-close1");

// When the user clicks on the button, open the modal 
btn.onclick = function() {
    modal.style.display = "block";
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
</script>


News

  • New 'Examples' section coming with wonderful tutorials!
  • Adding animations and transitions effects soon.
  • 0.3 development started. Join us here.

Get Involved

Your contribution can make beauter more beautiful. Visit Github to collaborate.

Star Fork

Sitemap Designed with by Shubham Ramdeo
Follow @ramdeoshubham
outboxcraft logoOutboxcraft
© 2017