diff options
| author | Jules <jules@asdf.us> | 2013-12-19 01:20:54 -0500 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2013-12-19 01:20:54 -0500 |
| commit | 3c1c175dd2860ade1215b45bc2aa1d135dc905d3 (patch) | |
| tree | a45b61a480ff45594c081d6a6d530a8da01dc1c6 /neighbor/index.html | |
neighbor
Diffstat (limited to 'neighbor/index.html')
| -rw-r--r-- | neighbor/index.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/neighbor/index.html b/neighbor/index.html new file mode 100644 index 0000000..8356796 --- /dev/null +++ b/neighbor/index.html @@ -0,0 +1,56 @@ +<!doctype html> +<html> +<head><title>Neighbor JS</title></head> +<style> +#people { height:300px; width: 100%; overflow: hidden; white-space: nowrap; } +#wallpaper { height:300px; width: 100%; overflow: hidden; white-space: nowrap; } +</style> +<body> +<h1>Neighbor.js</h1> + +<p> + <b>Neighbor.js</b> resizes images using a nearest neighbor algorithm automatically. +</p> + +<code> + $("#people img").neighbor(); +</code> + +<div id="people"> + <img src="people.GIF" width="50"> + <img src="people.GIF" width="70"> + <img src="people.GIF" width="100"> + <img src="people.GIF" width="135"> + <img src="people.GIF" width="170"> + <img src="people.GIF" width="210"> + <img src="people.GIF" width="250"> + <img src="people.GIF" width="295"> +</div> + +<p> + Run it on particular images, or all images automatically. +</p> + +<p> + Also use it to put a nearest-neighbor resized image on the background of an element: +</p> + +<code> + $("#wallpaper").neighbor({ url: "people2.GIF", scale: "250%" }); +</code> + +<div id="wallpaper"></div> + + +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="jquery.neighbor.js"></script> +<script type="text/javascript"> +$("code").each(function(){ + eval($(this).html()); +}); +</script> + + +</body> +</html> + |
