Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add iframe example for thewca/worldcubeassociation.org#3025 (comment)
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<html> | ||
<head> | ||
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script> | ||
|
||
<!-- Latest compiled and minified CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> | ||
|
||
<!-- Latest compiled and minified JavaScript --> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> | ||
</head> | ||
<body> | ||
|
||
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> | ||
Button with data-target | ||
</button> | ||
<div class="collapse" id="collapseExample"> | ||
<div class="well"> | ||
<iframe id="iframe"></iframe> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
console.log("Hello world");//<<< | ||
let iframe = document.getElementById('iframe'); | ||
iframe.contentWindow.addEventListener('resize', function() { | ||
console.log("resize event!"); | ||
}); | ||
</script> | ||
</body> | ||
</html> |