Difference between revisions of "Team:Exeter/Protocols"

Line 17: Line 17:
  
  
 +
 +
<div class="coverflow">
 +
    <div class="cover">A</div>
 +
    <div class="cover">B</div>
 +
    ...
 +
    <div class="cover">Y</div>
 +
    <div class="cover">Z</div>
 +
</div>
  
 
<script>
 
<script>
$(function() {
+
    $(function() {
if ($.fn.reflect) {
+
        $('.coverflow').coverflow();
$('#demo-coverflow .cover').reflect();// only possible in very specific situations
+
    });
}
+
 
+
$('#demo-coverflow').coverflow({
+
index:6,
+
density:2,
+
animateStep:function(event, cover, offset, isVisible, isMiddle, sin, cos) {
+
if (isVisible) {
+
if (isMiddle) {
+
$(cover).css({
+
'filter':'none',
+
'-webkit-filter':'none'
+
});
+
} else {
+
var brightness= 1 + Math.abs(sin),
+
contrast= 1 - Math.abs(sin),
+
filter= 'contrast('+contrast+') brightness('+brightness+')';
+
$(cover).css({
+
'filter':filter,
+
'-webkit-filter':filter
+
});
+
}
+
}
+
}
+
});
+
});
+
 
</script>
 
</script>
 
 
<body>
 
 
<div id="demo-coverflow">
 
<img class="cover" src="demo/1.jpg"/>
 
<img class="cover" src="demo/2.jpg"/>
 
<img class="cover" src="demo/3.jpg"/>
 
<img class="cover" src="demo/4.jpg"/>
 
<img class="cover" src="demo/5.jpg"/>
 
<img class="cover" src="demo/6.jpg"/>
 
...
 
</div>
 
 
</body>
 
  
  

Revision as of 16:03, 12 September 2015

A
B
...
Y
Z
  • Contact us:
    exeterigem@gmail.com