|
|
(20 intermediate revisions not shown) |
Line 14: |
Line 14: |
| <div class="slides"> | | <div class="slides"> |
| <ul class="slide-pic"> | | <ul class="slide-pic"> |
- | <li class="cur"><img alt="" src="https://static.igem.org/mediawiki/2014/b/b0/Shome9.jpg" /></li> | + | <li class="cur"><img alt="" src="https://static.igem.org/mediawiki/2014/3/38/Shome6.jpg" /></li> |
| <li><img alt="" src="https://static.igem.org/mediawiki/2014/6/6e/Shome8.jpg" /></li> | | <li><img alt="" src="https://static.igem.org/mediawiki/2014/6/6e/Shome8.jpg" /></li> |
| <li><img alt="" src="https://static.igem.org/mediawiki/2014/c/ce/Shome7.jpg" /></li> | | <li><img alt="" src="https://static.igem.org/mediawiki/2014/c/ce/Shome7.jpg" /></li> |
Line 28: |
Line 28: |
| </ul> | | </ul> |
| </div> | | </div> |
- | <script type="text/javascript">
| |
- | $(function ($) {
| |
- | if ($(".slide-pic").length > 0) {
| |
- | var defaultOpts = { interval: 2000, fadeInTime: 300, fadeOutTime: 200 };
| |
- | var _titles = $("ul.slide-li li");
| |
- | var _titles_bg = $("ul.op li");
| |
- | var _bodies = $("ul.slide-pic li");
| |
- | var _count = _titles.length;
| |
- | var _current = 0;
| |
- | var _intervalID = null;
| |
- | var stop = function () { window.clearInterval(_intervalID); };
| |
- | var slide = function (opts) {
| |
- | if (opts) {
| |
- | _current = opts.current || 0;
| |
- | } else {
| |
- | _current = (_current >= (_count - 1)) ? 0 : (++_current);
| |
- | };
| |
- | _bodies.filter(":visible").fadeOut(defaultOpts.fadeOutTime, function () {
| |
- | _bodies.eq(_current).fadeIn(defaultOpts.fadeInTime);
| |
- | _bodies.removeClass("cur").eq(_current).addClass("cur");
| |
- | });
| |
- | _titles.removeClass("cur").eq(_current).addClass("cur");
| |
- | _titles_bg.removeClass("cur").eq(_current).addClass("cur");
| |
- | };
| |
- | var go = function () {
| |
- | stop();
| |
- | _intervalID = window.setInterval(function () { slide(); }, defaultOpts.interval);
| |
- | };
| |
- | var itemMouseOver = function (target, items) {
| |
- | stop();
| |
- | var i = $.inArray(target, items);
| |
- | slide({ current: i });
| |
- | };
| |
- | _titles.hover(function () { if ($(this).attr('class') != 'cur') { itemMouseOver(this, _titles); } else { stop(); } }, go);
| |
- | _bodies.hover(stop, go);
| |
- | go();
| |
- | }
| |
- | });
| |
- | </script>
| |
| | | |
- | | + | <div style="position:absolute;top:600px;left:0;width:100%;"> |
- | <div id="subject"> | + | <img src="https://static.igem.org/mediawiki/2014/9/9a/Scut-china_2014_home-train.png" style="width:1366px;height:137px;"/> |
- | <div class="sub sub1" style="margin-left:0px;">
| + | |
- | <img src="#"> | + | |
- | <div class="cover co1">
| + | |
- | </div>
| + | |
- | </div>
| + | |
- | <div class="sub sub2">
| + | |
- | <img src="#">
| + | |
- | <div class="cover co2">
| + | |
- | </div>
| + | |
- | </div>
| + | |
- | <div class="sub sub3">
| + | |
- | <img src="#">
| + | |
- | <div class="cover co3">
| + | |
- | </div>
| + | |
- | </div>
| + | |
- | <div class="sub sub4">
| + | |
- | <img src="#">
| + | |
- | <div class="cover co4">
| + | |
- | </div>
| + | |
- | </div>
| + | |
| </div> | | </div> |
- | <script type="text/javascript">
| |
- | $(document).ready(function(){
| |
- | $(".cover").mouseover(function(){
| |
- | $(this).stop().animate({"marginTop":"0px"},300);
| |
- | });
| |
- | $(".cover").mouseout(function(){
| |
- | $(this).stop().animate({"marginTop":"166px"},300);
| |
- | });
| |
- | });
| |
- | </script>
| |
| | | |
| | | |
| | | |
| <div id="footer"> | | <div id="footer"> |
- | <img src="https://static.igem.org/mediawiki/2014/6/63/Bottom.jpg"> | + | <img src="https://static.igem.org/mediawiki/2014/0/0e/Scut-china_2014_bottom.jpg"> |
| </div> | | </div> |
| | | |
| </BODY> | | </BODY> |
| </HTML> | | </HTML> |