<commit_before>[![Build Status](https://travis-ci.org/mkay581/modal-js.svg?branch=master)](https://travis-ci.org/mkay581/modal-js)

# Modal

Create simple (or advanced), high-performant modals with minimal javascript and markup.
This library is built using native vanilla javascript, so it is lightweight and super fast.

## Benefits

* Hide and show modals in any area in the DOM
* Respond to events when modals are shown and hidden
* Fully customizable modal containers and content
* Supports multiple modals and modals inside of a modals.. weee!

## Usage

Create one or more modals with a few lines of javascript. With your html and css setup correctly, you can do:

```javascript
var modal = new Modal({
    el: '<div class="my-modal">My Modal Content</div>',
    containerEl: document.getElementById('modals-container'),
    activeClass: 'modal-active'
});

modal.setup(); // inject the modal's html into the modal container<commit_msg>Updating syntax<commit_after>[![Build Status](https://travis-ci.org/mkay581/modal-js.svg?branch=master)](https://travis-ci.org/mkay581/modal-js)

# Modal

Create simple (or advanced), high-performant modals with minimal javascript and markup.
This library is built using native vanilla javascript, so it is lightweight and super fast.

## Benefits

* Hide and show modals in any area in the DOM
* Respond to events when modals are shown and hidden
* Fully customizable modal containers and content
* Supports multiple modals and modals inside of a modals.. weee!

## Usage

Create one or more modals with a few lines of javascript. With your html and css setup correctly, you can do:

```javascript
let modal = new Modal({
    el: '<div class="my-modal">My Modal Content</div>',
    containerEl: document.getElementById('modals-container'),
    activeClass: 'modal-active'
});

modal.setup(); // inject the modal's html into the modal container
{'fraction_non_alphanumeric': 0.09968186638388123, 'fraction_numerical': 0.006362672322375398, 'mean_word_length': 4.5828402366863905, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2028233', 'n_tokens_mistral': 561, 'n_tokens_neox': 528, 'n_words': 220}