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.
- Host: GitHub
- URL: https://github.com/williankeller/jquery-modal-load-content
- Owner: williankeller
- License: mit
- Created: 2017-09-20T23:05:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T15:14:07.000Z (about 8 years ago)
- Last Synced: 2025-01-26T09:25:37.459Z (11 months ago)
- Topics: jquery, jquery-load, load, modal, modal-load, modal-load-content, modalloadcontent
- Language: JavaScript
- Homepage: https://williankeller.github.io/jquery-modal-load-content/
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## jQuery Modal Load Content [](https://github.com/williankeller/jquery-custom-select/blob/master/CONTRIBUTING.md) [](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';
});
```