forked from cape/parentIframeLocationHack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchildren.index.php
32 lines (25 loc) · 965 Bytes
/
children.index.php
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js" ></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$('a#color').click(function(){
window.parent.location.hash = 'color';
return false;
});
$('a#font').click(function(){
window.parent.location.hash = 'font';
return false;
});
});
</script>
<p> dentro del iframe</p>
<a href="#" id="color">cambiar bg color del padre</a> <br />
<a href="#" id ="font">cambiar font color del padre</a> <br />
</body>
</html>