Skip to content
This repository
tree: a1b41a42ca
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 101 lines (71 sloc) 3.181 kb
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">

<title>Anything Zoomer | Double</title>

<!-- demo only -->
<link href="http://fonts.googleapis.com/css?family=Merienda+One" rel="stylesheet">
<link rel="stylesheet" href="demo/style.css">

<!-- anythingZoomer required -->
<link rel="stylesheet" href="css/anythingzoomer.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="js/jquery.anythingzoomer.js"></script>
<script>
$(function() {

// clone the text
$(".zoom:first").anythingZoomer({
clone : true
});

$(".zoom:last").anythingZoomer();

$("button").click(function(){
var state = $(this).text(); // enable or disable
$(".zoom:eq(" + $(this).attr('data-id') + ")").anythingZoomer(state);
$(this).text( (state === "enable") ? "disable" : "enable" );
return false;
});

});
</script>
</head>

<body id="double">

<div id="main-content">

<h1>AnythingZoomer<sup>2</sup></h1>

<a href="https://github.com/CSS-Tricks/AnythingZoomer/zipball/master" id="dl">Download</a>

<ul id="nav">
<li><a href="index.html">Calendar</a></li>
<li><a href="image.html">Image</a></li>
<li><a href="swap.html">Swap</a></li>
<li><a href="text.html">Text</a></li>
<li><a class="current" href="double.html">Double</a></li>
<li><a class="use" href="use.html">Usage</a></li>
<li><a class="play" href="http://jsfiddle.net/Mottie/KwvjL/">Playground</a></li>
<li><a class="issue" href="https://github.com/CSS-Tricks/AnythingZoomer/issues">Issues</a></li>
</ul>

<h2>Double Demo</h2>

<p>
<ul class="info">
<li>Mouse over either section below to see the zoom window.</li>
<li>Double click within the section to toggle between the large and small versions.</li>
<li>Use the enable/disable button to turn AnythingZoomer on or off.</li>
</ul>
</p>

<hr>

<p><strong>Text Demo <button data-id="0">disable</button></strong></p>

<div class="zoom">

<div class="small">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</p>
</div>

<!-- the clone option will automatically make a div.large if it doesn't exist -->

</div>

<br>

<p><strong>Image Demo <button data-id="1">disable</button></strong></p>

<div class="zoom second">

<div class="small">
<img src="demo/rushmore_small.jpg" alt="small rushmore">
</div>

<div class="large">
<img src="demo/rushmore.jpg" alt="big rushmore">
</div>

</div>

</div>

</body>

</html>
Something went wrong with that request. Please try again.