Difference between revisions of "Team:Exeter/Protocols"
Line 2: | Line 2: | ||
<html> | <html> | ||
+ | <script src="https://2015.igem.org/Team:Exeter/code.jquery.com/jquery-latest.min?action=raw&ctype=text/javascript"></script> | ||
+ | <script src="https://2015.igem.org/Team:Exeter/ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min?action=raw&ctype=text/javascript"></script> | ||
− | + | <script src="jquery.coverflow.js"></script> | |
+ | <!-- Optional. CSS style interpolation. --> | ||
+ | <script src="jquery.interpolate.js"></script> | ||
+ | <!-- Optional. Mouse wheel. --> | ||
+ | <script src="jquery.mousewheel.js"></script> | ||
+ | <!-- Optional. Touch swipe. --> | ||
+ | <script src="jquery.touchSwipe.min.js"></script> | ||
+ | <!-- Optional. Reflection. --> | ||
+ | <script src="reflection.js"></script> | ||
− | |||
− | |||
− | |||
<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 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 15:55, 12 September 2015
...