Difference between revisions of "Team:Brasil-USP/Templates/Cover"

 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<html>
 
<html>
 
+
    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
 
     <link rel="stylesheet" href="https://2015.igem.org/wiki/index.php?title=Team:Brasil-USP/Templates/cover.css&action=raw&ctype=text/css" type="text/css"/>
 
     <link rel="stylesheet" href="https://2015.igem.org/wiki/index.php?title=Team:Brasil-USP/Templates/cover.css&action=raw&ctype=text/css" type="text/css"/>
  
Line 10: Line 10:
 
      
 
      
 
     <script>
 
     <script>
       $(document).ready(function()  
+
        
 +
    $(document).ready(function()
 +
    {
 +
      $('a[href*=#]').each(function()
 
       {
 
       {
        $('a[href*=#]').each(function()
+
       if ( location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') )
 
         {
 
         {
           if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
+
           this.hash.replace(/#/,'')
          && location.hostname == this.hostname
+
         var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']');
          && this.hash.replace(/#/,'') )  
+
          var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
 +
          if ($target)
 
           {
 
           {
             var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']');
+
             var targetOffset = $target.offset().top;
             var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
+
             $(this).click(function()
            if ($target)  
+
 
             {
 
             {
               var targetOffset = $target.offset().top;
+
               $("#nav li a").removeClass("active");
              $(this).click(function()
+
              $(this).addClass('active');
              {
+
              $('html, body').animate({scrollTop: targetOffset}, 1000);
                $("#nav li a").removeClass("active");
+
              return false;
                $(this).addClass('active');
+
            });
                $('html, body').animate({scrollTop: targetOffset}, 1000);
+
          }
                return false;
+
        }
              });
+
      });
            }
+
    });
          }
+
 
        });
+
   
      });
+
 
     </script>
 
     </script>
 +
 +
 +
<script>
 +
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 +
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 +
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 +
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 +
 +
  ga('create', 'UA-65251898-1', 'auto');
 +
  ga('send', 'pageview');
 +
 +
</script>
  
 
</html>
 
</html>

Latest revision as of 17:34, 19 July 2015