An open API service indexing awesome lists of open source software.

https://github.com/williankeller/jquery-modal-load-content

Load any internal or external content into a responsive and dynamic modal.
https://github.com/williankeller/jquery-modal-load-content

jquery jquery-load load modal modal-load modal-load-content modalloadcontent

Last synced: 9 months ago
JSON representation

Load any internal or external content into a responsive and dynamic modal.

Awesome Lists containing this project

README

          

## jQuery Modal Load Content [![Version](https://img.shields.io/badge/Version-1.0.1-orange.svg)](https://github.com/williankeller/jquery-custom-select/blob/master/CONTRIBUTING.md) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
Load any internal or external content into a responsive and dynamic modal.

### Basic usage:
Define the element that contain the link to be loaded:
```html
Page example
```

You can call the link from any element, not necessary from a href element, just call data-href:
```html

Example page

```

Also, you can define the target to be loaded. So, only the content inside the `.main-container` class will be loaded:
```html

Example page

```

jQuery call:
```js
$('.call-to-action').modalLoadContent();
```

### Options:
You also can define some options, like:
* `debugMode` - Display messages at the console (`false`);
* `overlayClass` - Default modal overlay class (`.modal-load-content-overlay`);
* `containerClass` - Default modal class container (`.modal-load-content-container`);
* `closeButtonClass` - Default close modal class (`.modal-load-content-close`);
* `closeButtonIcon` - Icon to close modal (`[Close]`);
* `closeButtonText` - Text to close on hover (`Close modal`);
* `errorClass` - Default error class (`.modal-load-content-error`);
* `errorText` - Default error text message (`The requested page could not be loaded.`);

#### Options usage:
```js
$('.call-to-action').modalLoadContent({
debugMode: true,
closeButtonIcon: 'x',
closeButtonText: 'Click to close';
});
```