first commit

This commit is contained in:
aschwarz
2023-04-25 13:25:59 +02:00
commit 086d1e1e9e
1774 changed files with 396049 additions and 0 deletions

View File

@ -0,0 +1,7 @@
## jQuery
If jQuery is detected on the page, then this library provides a simple jQuery interface.
```js
$('iframe').iFrameResize([{ options }])
```

View File

@ -0,0 +1,30 @@
## Vue
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
},
unbind: function (el) {
el.iFrameResizer.removeListeners();
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example