Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: turnertime/virtualist
base: e91b699754
...
head fork: turnertime/virtualist
compare: 9c6c062750
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 51 additions and 32 deletions.
  1. +23 −4 examples/dimensions.html
  2. +28 −28 index.html
View
27 examples/dimensions.html
@@ -3,6 +3,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width" />
<title>vertical - examples - virtualist</title>
<link href="../favicon.ico" rel="icon" type="image/x-icon" />
<style>
@@ -13,12 +14,30 @@
<body>
<div id="virtualist"></div>
-
+ <button id="screenAvail">screen.avail[Height|Width]</button>
+ <button id="screen">screen.[height|width]</button>
+ <button id="windowOuter">window.outer[Height|Width]</button>
+ <button id="windowInner">window.inner[Height|Width]</button>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
(function () {
- var list = document.getElementById("virtualist");
- list.style.height = window.screen.availHeight + "px";
- list.style.width = window.screen.availWidth + "px";
+ function setDimensions(width, height) {
+ var list = document.getElementById("virtualist");
+ list.style.height = window.screen.availHeight + "px";
+ list.style.width = window.screen.availWidth + "px";
+ }
+ $("#screenAvail").click(function onClick(){
+ setDimensions(window.screen.availWidth, window.screen.availHeight);
+ });
+ $("#screen").click(function onClick(){
+ setDimensions(window.screen.width, window.screen.height);
+ });
+ $("#windowOuter").click(function onClick(){
+ setDimensions(window.outerWidth, window.outerHeight);
+ });
+ $("#windowInner").click(function onClick(){
+ setDimensions(window.innerWidth, window.innerHeight);
+ });
}());
</script>
</body>
View
56 index.html
@@ -1,29 +1,29 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>virtualist</title>
- <link href="favicon.ico" rel="icon" type="image/x-icon" />
- <style>
- body { font-family: Sans-Serif; }
- header { height:128px; }
- header img { height:128px; width:128px; float:left; }
- header h1 { margin:0 138px; line-height:128px; }
- </style>
- </head>
- <body>
- <header>
- <img src="img/virtualist.png" alt="" />
- <h1>Virtualist</h1>
- </header>
- <h2>About</h2>
- <h2>Documentation</h2>
- <h2>Examples</h2>
- <ul>
- <li><a href="examples/dimensions.html">dimensions</a></li>
- <li><a href="examples/horizontal.html">horizontal</a></li>
- <li><a href="examples/vertical.html">vertical</a></li>
- </ul>
- </body>
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>virtualist</title>
+ <link href="favicon.ico" rel="icon" type="image/x-icon" />
+ <style>
+ body { font-family: Sans-Serif; }
+ header { height:128px; }
+ header img { height:128px; width:128px; float:left; }
+ header h1 { margin:0 138px; line-height:128px; }
+ </style>
+ </head>
+ <body>
+ <header>
+ <img src="img/virtualist.png" alt="" />
+ <h1>Virtualist</h1>
+ </header>
+ <h2>About</h2>
+ <h2>Documentation</h2>
+ <h2>Examples</h2>
+ <ul>
+ <li><a href="examples/dimensions.html">dimensions</a></li>
+ <li><a href="examples/horizontal.html">horizontal</a></li>
+ <li><a href="examples/vertical.html">vertical</a></li>
+ </ul>
+ </body>
</html>

No commit comments for this range

Something went wrong with that request. Please try again.