Merge branch 'master' of https://github.com/FranciscoPinto/cern-summer-webfest
This commit is contained in:
commit
2b45ee3bfa
5 changed files with 66 additions and 0 deletions
53
anim.htm
Normal file
53
anim.htm
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="http://code.jquery.com/ui/1.8.22/jquery-ui.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="js/jquery.bxSlider/jquery.easing.1.3.js"></script>
|
||||
<script src="js/jquery.bxSlider/jquery.bxSlider.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css" type="text/css" media="all" />
|
||||
|
||||
<style>
|
||||
|
||||
#animation {
|
||||
width: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bx-captions {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="animation">
|
||||
<ul id="frames">
|
||||
<li><img title="This is the first frame" src="animation/img1.png">
|
||||
<li><img title="This is the second frame" src="animation/img2.png">
|
||||
<li><img title="This is the third frame" src="animation/img3.png">
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="slider"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var anim = $('#frames').bxSlider({
|
||||
controls: false,
|
||||
mode: 'fade',
|
||||
speed: 100,
|
||||
captions: true
|
||||
});
|
||||
|
||||
|
||||
$("#slider" ).slider({
|
||||
value: 0,
|
||||
min: 0,
|
||||
max: 2,
|
||||
step: 1,
|
||||
slide: function( event, ui ) {
|
||||
anim.goToSlide(ui.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
BIN
animation/img1.png
Normal file
BIN
animation/img1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
BIN
animation/img2.png
Normal file
BIN
animation/img2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
animation/img3.png
Normal file
BIN
animation/img3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
13
js/slider.js
13
js/slider.js
|
|
@ -14,4 +14,17 @@ $(function(){
|
|||
slider.goToNextSlide();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).keydown(function(e){
|
||||
if (e.keyCode == 37) {
|
||||
slider.goToPreviousSlide();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.keyCode == 39) {
|
||||
slider.goToNextSlide();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue