Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/jquery-simple-iframe-view
https://github.com/kanety/jquery-simple-iframe-view
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/jquery-simple-iframe-view
- Owner: kanety
- License: mit
- Created: 2019-06-09T04:21:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-05T04:32:32.000Z (over 5 years ago)
- Last Synced: 2024-12-25T04:04:43.392Z (23 days ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery-simple-iframe-view
A jquery plugin for simple iframe viewer.
## Dependencies
* jquery
## Installation
Install from npm:
$ npm install @kanety/jquery-simple-iframe-view --save
## Usage
Build html as follows:
```html
```Then run:
```javascript
$('#index').simpleIframeView({
container: '#iframes'
});
```### Options
URL selector options:
```javascript
$('#index').simpleIframeView({
urlSelector: 'a',
urlAttribute: 'href',
container: '#iframes'
});
```Iframe options:
```javascript
$('#index').simpleIframeView({
container: '#iframes'
template: '',
marginHeight: 0,
maxCache: 100,
autoResize: true
});
```### Callbacks
```javascript
$('#iframes').simpleIframeView({
...
}).on('iframe:show', function(e, $iframe) {
...
}).on('iframe:hide', function(e, $iframe) {
...
}).on('iframe:loaded', function(e, $iframe) {
...
}).on('iframe:resized', function(e, $iframe) {
...
});
```## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).