annotate iframe-resizer/example/frame.hover.html @ 6:42076db43d42 draft

Fixed auto resizing plus various other minor bugs
author saskia-hiltemann
date Mon, 16 Nov 2015 08:56:22 -0500
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <meta charset="utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 <title>iFrame message passing test</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 <meta name="description" content="iFrame message passing test">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <meta http-equiv="X-UA-Compatible" content="IE=edge">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 <style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 a { float:right; margin-left:10px;}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 <body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <b>iFrame :Hover Example</b>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <a href="frame.content.html">Back to page 1</a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 </a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 <p>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 Mouse over the code example below.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 </p>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 <xmp><!-- #code --></xmp>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 <div id="code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 <style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 xmp{background-color: #eee;padding:0 20px;display:block;}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 xmp:hover{border:#c33 solid 40px;}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 <script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 (function(){
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 $('xmp').hover(function(){
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 if ('parentIFrame' in window) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 setTimeout(function(){ // Fix FireFox timing issue
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 parentIFrame.size();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 },0);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 });
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 })();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 </script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <script>$('xmp').text($('#code').html());</script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 </html>