Difference between revisions of "Team:SUSTech Shenzhen/themeJs"

 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<html>
 
<html>
 
<footer>
 
<footer>
     <script src="https://2014.igem.org/Team:SUSTC-Shenzhen/js/pace.min.js?action=raw&ctype=text/javascript"></script>
+
     <script src="https://2014.igem.org/Team:SUSTech_Shenzhen/js/pace-min-js?action=raw&ctype=text/javascript"></script>
 
     <!--script src="//2014.igem.org/Team:SUSTC-Shenzhen/static/js/jquery.pjax.js?action=raw&ctype=text/javascript"></script-->
 
     <!--script src="//2014.igem.org/Team:SUSTC-Shenzhen/static/js/jquery.pjax.js?action=raw&ctype=text/javascript"></script-->
     <script src="https://2014.igem.org/Team:SUSTC-Shenzhen/js/bootstrap.min.js?action=raw&ctype=text/javascript"></script>
+
     <script src="https://2016.igem.org/Team:SUSTech_Shenzhen/js/bootstrap-min-js?action=raw&ctype=text/javascript"></script>
 
<script>
 
<script>
 
document.querySelector("head > link[rel='stylesheet']").remove();
 
document.querySelector("head > link[rel='stylesheet']").remove();
Line 31: Line 31:
 
      
 
      
 
       $("nav a").each(function(ind,val){
 
       $("nav a").each(function(ind,val){
         if(val.href===window.location.href){
+
         if(val.href===window.location.href)
 +
          if (val.href!="https://2016.igem.org/Team:SUSTech_Shenzhen"){
 
           val.href="#";
 
           val.href="#";
 
           $(val).parent().addClass("active");
 
           $(val).parent().addClass("active");
Line 78: Line 79:
 
       offset: 71
 
       offset: 71
 
     });
 
     });
   setTimeout(function () {
+
   function affix_sidebar () {
 
       var $sideBar = $('.bs-docs-sidebar')
 
       var $sideBar = $('.bs-docs-sidebar')
  
Line 95: Line 96:
 
         }
 
         }
 
       })
 
       })
     }, 100)
+
     }
   </script>
+
   affix_sidebar();
  
 +
  $("#searchform").submit(function (e){
 +
    $("#searchInput").val("SUSTech "+$("#searchInput").val());
 +
  });
 +
  $('.reference>a, span.mw-cite-backlink > a, .page-scroll').click(function() {
 +
    console.log(this.hash);
 +
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
 +
        || location.hostname == this.hostname) {
 +
 +
        var target = $('[id="'+this.hash.substring(1)+'"]');
 +
        target = target.length ? target : $('[name="' + this.hash.slice(1) +'"]');
 +
          if (target.length) {
 +
            $('html,body').animate({
 +
                scrollTop: target.offset().top-70
 +
            }, 1000);
 +
            return false;
 +
        }
 +
    }
 +
  });
 +
  $(".table, .katex-block > span").wrap("<div class='table-responsive'></div>")
 +
 +
  </script>
 +
  <link rel="stylesheet" href="https://2016.igem.org/Team:SUSTech_Shenzhen/css/katex-css?action=raw&ctype=text/css">
 +
  <link rel="stylesheet" href="https://2016.igem.org/Team:SUSTech_Shenzhen/css/ionicons-min-css?action=raw&ctype=text/css">
 
</footer>
 
</footer>
 
</html>
 
</html>

Latest revision as of 20:02, 19 October 2016