Last active
August 16, 2016 12:22
-
-
Save martingust/48c0e468a113137d68f42f112a60dadc to your computer and use it in GitHub Desktop.
Virtual Repeat change height to top of document
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>GistRun</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
<h1>Change height to top of document</h1> | |
<div class="expand" onclick="expand()">Click me</div> | |
<ul> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
<li>Item</li> | |
</ul> | |
<script src="script.js"></script> | |
</body> | |
</html> |
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
function expand(){ | |
var elem = document.querySelector('.expand'); | |
elem.style.height = '150px'; | |
} |
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
.expand { | |
background-color: blue; | |
height: 20px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment