Difference between revisions of "Team:Tongji China"

m (Move template to master. -- committed by WeisiWang)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{:Team:Tongji_China/resource/indextest/bootstrap}}
+
{{:Team:Tongji_China/template}}
  
 
<html>
 
<html>
<script>
+
    <script src="https://2019.igem.org/wiki/index.php?title=Team:Tongji_China/tags/v0.2/js/mainpage.js&action=raw&ctype=text/javascript"></script>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
 
+
$(document).ready(function() {
+
 
+
//remove the HQ_page id
+
$("#HQ_page").attr('id','');
+
+
 
+
//highlight current page on the menu
+
highlight_current_page_menu();
+
+
//accessing submenus
+
$(".menu_item").click(function(){
+
$(".submenu_control_icon", this).toggleClass("open");
+
$(this).next(".submenu").fadeToggle(400);
+
});
+
+
//mobile menu access
+
$(".igem_2019_team_mobile_bar").click(function(){
+
$(this).next().toggleClass("displaying_menu");
+
});
+
+
});
+
 
+
 
+
function highlight_current_page_menu() {
+
+
var page_url="https://2019.igem.org/";
+
page_url = page_url + wgPageName;
+
$("a[href$='"+ page_url +"']").children().addClass("current_page");
+
+
//if the page is in a submenu, open the submenu and make the appropiate changes
+
if( $( ".current_page" ).hasClass( "submenu_item" )){
+
+
$(".current_page").parent().parent().fadeToggle(400);
+
$(".current_page").parent().parent().prev().addClass("current_page");
+
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
+
+
}
+
}
+
 
+
 
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
</script>
+
 
</html>
 
</html>

Latest revision as of 08:08, 21 October 2019

Loading...