forked from GianlucaGuarini/Vague.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (30 loc) · 982 Bytes
/
index.html
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
<!DOCTYPE html>
<head>
<title>Vague.js</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<figure class="container"></figure>
<article>
<a target="_blank" href="https://github.com/GianlucaGuarini/vague.js">Vague.js</a>
<span href="#" class="btn">Toggle</span>
<span href="#" class="btn animate">Animate intensity: <input type="text" value="30" /></span>
</article>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="Vague.js"></script>
<script>
var vague = $(".container").Vague({intensity:30});
vague.blur();
$('.btn:not(.animate)').on('click',$.proxy(vague.toggleblur,vague));
$('.btn input').on('keyup blur',function(e){
vague.animate(+$(e.currentTarget).val(),{
duration:800
}).done(function(){
if (window.console)
console.log('Animation Complete!');
});
});
</script>
</body>
</html>