|
|
(One intermediate revision not shown) |
Line 1: |
Line 1: |
| + | <html> |
| + | <style> |
| + | |
| #Banner { | | #Banner { |
| display: none; | | display: none; |
Line 271: |
Line 274: |
| text-decoration: underline; | | text-decoration: underline; |
| } | | } |
- | <html> | + | </style> |
- | <!-- JavaScript & JQuery -->
| + | |
- | <script>
| + | |
- | $(document).ready(function() {
| + | |
- | var TotalSlides = $('.Person').length
| + | |
- | var CurrentSlide = 0;
| + | |
- |
| + | |
- | $('#Carousel').css('display', 'block');
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- |
| + | |
- | if ($('body').width() < 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'none');
| + | |
- | $('.Slide1').css('left', '90px');
| + | |
- | $('.Slide2').css('left', '255px');
| + | |
- | $('.Slide3').css('left', '420px');
| + | |
- | $('#Carousel, #WriteUp').css('width', '675px');
| + | |
- | }
| + | |
- | if ($('body').width() < 675) {
| + | |
- | $('#Carousel').css('display', 'none');
| + | |
- | $('.Info').css('display', 'block');
| + | |
- | $('#WriteUp').css('width', '100%');
| + | |
- | $('#WriteUp .Text, #WriteUp .InfoImg').css('width', '100%')
| + | |
- | }
| + | |
- |
| + | |
- | $(window).resize(function() {
| + | |
- | if ($('body').width() >= 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'block');
| + | |
- | $('.Person').css('left', '');
| + | |
- | $('#Carousel, #WriteUp').css('width', '990px');
| + | |
- | $('#Carousel').css('display', 'block');
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- | $('#WriteUp .Text, #WriteUp .InfoImg').css('width', '50%')
| + | |
- | }
| + | |
- | if ($('body').width() < 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'none');
| + | |
- | $('.Slide1').css('left', '90px');
| + | |
- | $('.Slide2').css('left', '255px');
| + | |
- | $('.Slide3').css('left', '420px');
| + | |
- | $('#Carousel, #WriteUp').css('width', '675px');
| + | |
- | $('#Carousel').css('display', 'block');
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- | $('#WriteUp .Text, #WriteUp .InfoImg').css('width', '50%')
| + | |
- | }
| + | |
- | if ($('body').width() < 675) {
| + | |
- | $('#Carousel').css('display', 'none');
| + | |
- | $('.Info').css('display', 'block');
| + | |
- | $('#WriteUp').css('width', '100%');
| + | |
- | $('#WriteUp .Text, #WriteUp .InfoImg').css('width', '100%')
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- | $('#bodyContent').css({'min-height' : $(window).height(), background : 'url(https://static.igem.org/mediawiki/2013/8/89/2013UCalgaryTeamBackground.png)'});
| + | |
- |
| + | |
- | $('#RightArrow').click(function() {
| + | |
- | CurrentSlide = ++CurrentSlide % TotalSlides;
| + | |
- | $('.Person').css('display', 'none');
| + | |
- | var i = CurrentSlide;
| + | |
- |
| + | |
- | for (var count = 0; count < 5; count++) {
| + | |
- | if (i >= TotalSlides)
| + | |
- | i = 0;
| + | |
- |
| + | |
- | $('.Person').removeClass('Slide' + count);
| + | |
- |
| + | |
- | SlideID = '#Person' + i;
| + | |
- | $(SlideID).css('display', 'block').addClass('Slide' + count);
| + | |
- | i++;
| + | |
- | }
| + | |
- |
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- |
| + | |
- | if ($('body').width() < 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'none');
| + | |
- | $('.Slide1').css('left', '90px');
| + | |
- | $('.Slide2').css('left', '255px');
| + | |
- | $('.Slide3').css('left', '420px');
| + | |
- | $('#Carousel, #WriteUp').css('width', '675px');
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- | $('#LeftArrow').click(function() {
| + | |
- | CurrentSlide = (CurrentSlide + TotalSlides - 1) % TotalSlides;
| + | |
- | $('.Person').css('display', 'none');
| + | |
- | var i = CurrentSlide;
| + | |
- |
| + | |
- | for (var count = 0; count < 5; count++) {
| + | |
- | if (i >= TotalSlides)
| + | |
- | i = 0;
| + | |
- |
| + | |
- | $('.Person').removeClass('Slide' + count);
| + | |
- |
| + | |
- | SlideID = '#Person' + i;
| + | |
- | $(SlideID).css('display', 'block').addClass('Slide' + count);
| + | |
- | i++;
| + | |
- | }
| + | |
- |
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- |
| + | |
- | if ($('body').width() < 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'none');
| + | |
- | $('.Slide1').css('left', '90px');
| + | |
- | $('.Slide2').css('left', '255px');
| + | |
- | $('.Slide3').css('left', '420px');
| + | |
- | $('#Carousel, #WriteUp').css('width', '675px');
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- | $('.Person').click(function() {
| + | |
- | var ClickedPerson = $(this).attr('id');
| + | |
- | CurrentSlide = ((parseInt(ClickedPerson.replace('Person', ''))) + TotalSlides - 2) % TotalSlides;
| + | |
- |
| + | |
- | $('.Person').css('display', 'none');
| + | |
- | var i = CurrentSlide;
| + | |
- |
| + | |
- | for (var count = 0; count < 5; count++) {
| + | |
- | if (i >= TotalSlides)
| + | |
- | i = 0;
| + | |
- |
| + | |
- | $('.Person').removeClass('Slide' + count);
| + | |
- |
| + | |
- | SlideID = '#Person' + i;
| + | |
- | $(SlideID).css('display', 'block').addClass('Slide' + count);
| + | |
- | i++;
| + | |
- | }
| + | |
- |
| + | |
- | $('.Info').css('display', 'none');
| + | |
- | $('#Bio' + ((CurrentSlide + TotalSlides + 2) % TotalSlides)).css('display', 'block');
| + | |
- |
| + | |
- | if ($('body').width() < 990) {
| + | |
- | $('.Slide0, .Slide4').css('display', 'none');
| + | |
- | $('.Slide1').css('left', '90px');
| + | |
- | $('.Slide2').css('left', '255px');
| + | |
- | $('.Slide3').css('left', '420px');
| + | |
- | $('#Carousel, #WriteUp').css('width', '675px');
| + | |
- | }
| + | |
- | });
| + | |
- | });
| + | |
- | </script>
| + | |
- | <script>
| + | |
- | document.ondblclick = function(evt) {
| + | |
- | if (window.getSelection)
| + | |
- | window.getSelection().removeAllRanges();
| + | |
- | else if (document.selection)
| + | |
- | document.selection.empty();
| + | |
- | }
| + | |
- | </script>
| + | |
| </html> | | </html> |