-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframe.textarea.html
46 lines (35 loc) · 1004 Bytes
/
frame.textarea.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>iFrame message passing test</title>
<meta name="description" content="iFrame message passing test">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
a { float:right; margin-left:10px;}
</style>
</head>
<body>
<b>iFrame TextArea Example</b>
<a href="frame.content.html">Back to page 1</a>
</a>
<p>
Resize the textarea below.
</p>
<textarea id="textArea">Resize me</textarea>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="../js/iframeResizer.contentWindow.min.js"></script>
<script>
function store(){
this.x = this.offsetWidth;
this.y = this.offsetHeight;
}
$('textarea').each(store).on('mouseover mouseout',function(){
if (this.offsetWidth !== this.x || this.offsetHeight !== this.y){
if ('parentIFrame' in window) parentIFrame.size();
store.call(this);
}
});
</script>
</body>
</html>