Team:Virginia/Attributions

From 2014.igem.org

(Difference between revisions)
(Blanked the page)
Line 1: Line 1:
 +
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 +
<html>
 +
<head>
 +
 +
    <script src="http://code.jquery.com/jquery-git2.js"></script>
 +
    <style>
 +
#slider-wrapper {width:700px; height:200px;}
 +
    #slider {width:700px; height:200px; position:relative;}
 +
    .sp {width:700px; height:200px; position:absolute;}
 +
 +
    #nav {margin-top:20px; width:100%;}
 +
    #button-previous {float:left;}
 +
    #button-next {float:right;}
 +
    </style>
 +
    <script>
 +
$(document).ready(function(){
 +
    $('.sp').first().addClass('active');
 +
    $('.sp').hide();   
 +
    $('.active').show();
 +
 +
    $('#button-next').click(function(){
 +
 +
    $('.active').removeClass('active').addClass('oldActive');   
 +
                  if ( $('.oldActive').is(':last-child')) {
 +
        $('.sp').first().addClass('active');
 +
        }
 +
        else{
 +
        $('.oldActive').next().addClass('active');
 +
        }
 +
    $('.oldActive').removeClass('oldActive');
 +
    $('.sp').fadeOut();
 +
    $('.active').fadeIn();
 +
       
 +
       
 +
    });
 +
 +
      $('#button-previous').click(function(){
 +
    $('.active').removeClass('active').addClass('oldActive');   
 +
          if ( $('.oldActive').is(':first-child')) {
 +
        $('.sp').last().addClass('active');
 +
        }
 +
          else{
 +
    $('.oldActive').prev().addClass('active');
 +
          }
 +
    $('.oldActive').removeClass('oldActive');
 +
    $('.sp').fadeOut();
 +
    $('.active').fadeIn();
 +
    });
 +
 +
 +
 +
 +
    });
 +
    </script>
 +
 +
    <title></title>
 +
</head>
 +
 +
<body>
 +
    <div id="slider-wrapper">
 +
        <div id="slider">
 +
            <div class="sp" style="background: blue;">
 +
                akjdfalfkdj
 +
            </div>
 +
 +
            <div class="sp" style="background: yellow;">
 +
                akjdfautlfkdkjkhkj
 +
            </div>
 +
 +
            <div class="sp" style="background: green;">
 +
                akjdfalfkdiyukjkhkj
 +
            </div>
 +
 +
            <div class="sp" style="background: red;">
 +
                akjdfalfkdkkljjkhkj
 +
            </div>
 +
        </div>
 +
    </div>
 +
 +
    <div id="nav"></div>
 +
 +
    <div id="button-previous">
 +
        prev
 +
    </div>
 +
 +
    <div id="button-next">
 +
        next
 +
    </div>
 +
</body>
 +
</html>

Revision as of 15:08, 16 June 2014

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">

akjdfalfkdj
akjdfautlfkdkjkhkj
akjdfalfkdiyukjkhkj
akjdfalfkdkkljjkhkj
prev
next