Difference between revisions of "Team:Exeter/Protocols"

Line 15: Line 15:
 
<!-- Optional. Reflection. -->
 
<!-- Optional. Reflection. -->
 
<script src="reflection.js"></script>
 
<script src="reflection.js"></script>
 +
 
  
 +
<script>
 +
$(function() {
 +
if ($.fn.reflect) {
 +
$('#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>
  
<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>
 
    $(function() {
 
        $('.coverflow').coverflow();
 
    });
 
</script>
 
  
  
 +
<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>
  
  

Revision as of 16:06, 12 September 2015

...
  • Contact us:
    exeterigem@gmail.com