Difference between revisions of "Team:Greece/Team"

Line 13: Line 13:
 
     <!-- Call Jquery -->
 
     <!-- Call Jquery -->
 
     <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
 
     <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
 +
 +
    <!-- Plugin -->
 +
    <script>
 +
      (function($) {
 +
          $.fn.goTo = function() {
 +
            $('html, body').animate({
 +
                scrollTop: $(this).offset().top + 'px'
 +
            }, 1000);
 +
          return this; // for chaining...
 +
          }
 +
      })(jQuery);
 +
    </script>
  
 
     <!-- Call Template Scrips -->
 
     <!-- Call Template Scrips -->
Line 62: Line 74:
 
     $('.display_frame').removeClass('reveal');
 
     $('.display_frame').removeClass('reveal');
 
     $('#' + stateMsg).addClass('reveal');
 
     $('#' + stateMsg).addClass('reveal');
     scrollTillBottom();
+
     $('#ct1').goTo();
  
 
}
 
}
 
     </script>
 
     </script>
    <!-- Smooth Scrolling (Top to Bottom and vice versa) -->
 
    <script>
 
 
var myVar;
 
function scrollTillBottom() {
 
    var i=0;
 
    myVar = setInterval(function(){ i += 1; scrollBy(0,10); console.log(i); if(i == 95) myStopFunction(); }, 2);
 
}
 
 
function scrollTillTop(){
 
    var j=0;
 
    myVar = setInterval(function(){ j += 1; scrollBy(0,-10); console.log(j); if(j == 95) myStopFunction(); }, 2);
 
}
 
 
function myStopFunction() {
 
    clearInterval(myVar);
 
}
 
 
$('#toTop').click( function(e) {
 
  e.preventDefault();
 
  scrollTillTop();
 
});
 
  
</script>
 
 
</head>
 
</head>
 
<body>
 
<body>
Line 149: Line 138:
 
<!-- Subsection Box -->
 
<!-- Subsection Box -->
 
<div id='display_box'>
 
<div id='display_box'>
   <object id='TeamIntro' width='100%' height='100%' class='display_frame hide' data='https://2017.igem.org/Team:Greece/TeamIntro' ></object>
+
   <span id='ct1'><object id='TeamIntro' width='100%' height='100%' class='display_frame hide' data='https://2017.igem.org/Team:Greece/TeamIntro' ></object></span>
  
 
   <object id='TeamRoster' width='100%' height='100%' class='display_frame hide' data='https://2017.igem.org/Team:Greece/TeamRoster'></object>
 
   <object id='TeamRoster' width='100%' height='100%' class='display_frame hide' data='https://2017.igem.org/Team:Greece/TeamRoster'></object>

Revision as of 10:57, 1 September 2017

Loading...