|
|
Line 177: |
Line 177: |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script> | | <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script> |
- |
| |
- | <script>
| |
- | $(document).ready(function() {
| |
- | document.title = 'iGEM Berlin 2014 | Project | @igem.org';
| |
- | });
| |
- |
| |
- | // NAVBAR STYLE
| |
- |
| |
- | $(document).ready(function(){
| |
- | // this will get the full URL at the address bar
| |
- | var url = window.location.href;
| |
- | // passes on every "a" tag
| |
- | $(".main-menue-ul a").each(function() {
| |
- | // checks if its the same on the address bar
| |
- | if(url <strong> (this.href)) {
| |
- | $(this).children("li").addClass("active");
| |
- | $(this).removeClass("main-menue-links");
| |
- |
| |
- | }
| |
- | });
| |
- | });
| |
- |
| |
- |
| |
- | // my scroll to
| |
- | $("#main-button").click(function() {
| |
- | $('html, body').animate({
| |
- | scrollTop: $("#main-featurette-row").offset().top - 57
| |
- | }, 720);
| |
- | });
| |
- |
| |
- | // my scroll to
| |
- | $("#ecoli-button").click(function() {
| |
- | $('html, body').animate({
| |
- | scrollTop: $("#first-featurette-row").offset().top - 57
| |
- | }, 800);
| |
- | });
| |
- |
| |
- | // my scroll to
| |
- | $("#project-button").click(function() {
| |
- | $('html, body').animate({
| |
- | scrollTop: $("#team-featurette-row").offset().top - 57
| |
- | }, 800);
| |
- | });
| |
- |
| |
- | // my scroll to
| |
- | $("#team-button").click(function() {
| |
- | $('html, body').animate({
| |
- | scrollTop: $("#blog-featurette-row").offset().top - 57
| |
- | }, 800);
| |
- | });
| |
- |
| |
- |
| |
- | $(document).ready(function(){
| |
- | // cache the window object
| |
- | $window = $(window);
| |
- |
| |
- | $('section[data-type="background"]').each(function(){
| |
- | // declare the variable to affect the defined data-type
| |
- | var $scroll = $(this);
| |
- |
| |
- | $(window).scroll(function() {
| |
- | // HTML5 proves useful for helping with creating JS functions!
| |
- | // also, negative value because we're scrolling upwards
| |
- | var yPos = -($window.scrollTop() / $scroll.data('speed'));
| |
- |
| |
- | // background position
| |
- | var coords = '80% '+ yPos + 'px';
| |
- |
| |
- | // move the background
| |
- | $scroll.css({ backgroundPosition: coords });
| |
- | }); // end window scroll
| |
- | }); // end section function
| |
- |
| |
- | $("#section-B").hide();
| |
- | $("#section-C").hide();
| |
- | $("#C-up").hide();
| |
- | $("#B-up").hide();
| |
- |
| |
- | $("#show-B").click(function(){
| |
- | $("#section-B").slideToggle();
| |
- | $("#B-up").toggle();
| |
- | $("#B-down").toggle();
| |
- | });
| |
- |
| |
- | $("#show-C").click(function(){
| |
- | $("#section-C").slideToggle();
| |
- | $("#C-up").toggle();
| |
- | $("#C-down").toggle();
| |
- | });
| |
- |
| |
- | }); // close out script
| |
- |
| |
- |
| |
- | //NAVBAR STYLE
| |
- | $(".main-menue").css("background-color", "transparent");
| |
- |
| |
- | $(window).scroll(function() {
| |
- |
| |
- | if ($(this).scrollTop() >= 240) {
| |
- | $(".main-menue").css("background-color","rgb(255, 255, 255)");
| |
- | }
| |
- |
| |
- | if ($(this).scrollTop() < 240) { // this refers to window
| |
- | $(".main-menue").css("background-color","transparent");
| |
- | }
| |
- |
| |
- | });
| |
- |
| |
- |
| |
- |
| |
- | var windowSize = $(window).height();
| |
- | $(".site-wrapper-sub-project").css( "height" , windowSize );
| |
- |
| |
- |
| |
- | // Change iGEM.ORG Wiki Style
| |
- | $("#top-section").addClass("navbar-fixed-top hidden-xs hidden-sm hidden-md");
| |
- | $("#top-section").css("background-color","white");
| |
- | $(".left-menu").css("float","left");
| |
- | $(".right-menu").css("float","right");
| |
- |
| |
- | $( ".left-menu ul li" ).each(function() {
| |
- | $( this ).css( "margin-right","10px" );
| |
- | });
| |
- |
| |
- | $( ".right-menu ul li" ).each(function() {
| |
- | $( this ).css( "m
| |
- |
| |
- | argin-left","10px" );
| |
- | });
| |
- |
| |
- | $( ".right-menu ul li:last-child" ).css( "margin-right","10px" );
| |
- |
| |
- | $( "html" ).css( "margin-top","-10px" );
| |
- |
| |
- |
| |
- | </script>
| |
| | | |
| </body> | | </body> |
| | | |
| </html> | | </html> |