Difference between revisions of "Template:CCU Taiwan"

(刪掉空白)
Line 6: Line 6:
  
 
$("#HQ_page").attr('id','');
 
$("#HQ_page").attr('id','');
 
  
 
//highlight current page on the menu
 
//highlight current page on the menu
 
highlight_current_page_menu();
 
highlight_current_page_menu();
 
 
//accessing submenus
 
//accessing submenus
 
$(".menu_item").click(function(){
 
$(".menu_item").click(function(){
Line 16: Line 14:
 
$(this).next(".submenu").fadeToggle(400);
 
$(this).next(".submenu").fadeToggle(400);
 
});
 
});
 
 
//mobile menu access  
 
//mobile menu access  
 
$(".igem_2018_team_mobile_bar").click(function(){
 
$(".igem_2018_team_mobile_bar").click(function(){
 
$(this).next().toggleClass("displaying_menu");
 
$(this).next().toggleClass("displaying_menu");
 
});
 
});
 
 
});
 
});
  
  
 
function highlight_current_page_menu() {
 
function highlight_current_page_menu() {
 
 
var page_url="https://2018.igem.org/";
 
var page_url="https://2018.igem.org/";
 
page_url = page_url + wgPageName;
 
page_url = page_url + wgPageName;
 
$("a[href$='"+ page_url +"']").children().addClass("current_page");
 
$("a[href$='"+ page_url +"']").children().addClass("current_page");
 
 
//if the page is in a submenu, open the submenu and make the appropiate changes
 
//if the page is in a submenu, open the submenu and make the appropiate changes
 
if( $( ".current_page" ).hasClass( "submenu_item" )){
 
if( $( ".current_page" ).hasClass( "submenu_item" )){
 
 
$(".current_page").parent().parent().fadeToggle(400);
 
$(".current_page").parent().parent().fadeToggle(400);
 
$(".current_page").parent().parent().prev().addClass("current_page");
 
$(".current_page").parent().parent().prev().addClass("current_page");
 
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
 
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
 
 
}
 
}
 
}
 
}
 
$(window).on('scroll',function() {
 
$(window).on('scroll',function() {
   if($(window).scrollTop())  
+
   if($(window).scrollTop())
 
{
 
{
 
     $('.container').css('background', '#808080');
 
     $('.container').css('background', '#808080');
Line 47: Line 39:
 
$('nav').css('opacity','1');
 
$('nav').css('opacity','1');
 
     }
 
     }
     else  
+
     else
 
{
 
{
 
$('.container').css('background', '#000000');
 
$('.container').css('background', '#000000');
Line 54: Line 46:
 
     }
 
     }
 
   });
 
   });
// When the user scrolls the page, execute myFunction  
+
// When the user scrolls the page, execute myFunction
 
window.onscroll = function() {myFunction()};
 
window.onscroll = function() {myFunction()};
  
Line 81: Line 73:
 
         scrollTop: $(hash).offset().top
 
         scrollTop: $(hash).offset().top
 
       }, 800, function(){
 
       }, 800, function(){
 
 
 
         // Add hash (#) to URL when done scrolling (default click behavior)
 
         // Add hash (#) to URL when done scrolling (default click behavior)
 
         window.location.hash = hash;
 
         window.location.hash = hash;
Line 90: Line 81:
  
 
$(window).on('scroll',function() {
 
$(window).on('scroll',function() {
   if($(window).scrollTop())  
+
   if($(window).scrollTop())
 
{
 
{
 
     $('.container').css('background', '#808080');
 
     $('.container').css('background', '#808080');
Line 96: Line 87:
 
$('nav').css('opacity','1');
 
$('nav').css('opacity','1');
 
     }
 
     }
     else  
+
     else
 
{
 
{
 
$('.container').css('background', '#000000');
 
$('.container').css('background', '#000000');
Line 135: Line 126:
 
@media only screen and (max-width: 1800px) {
 
@media only screen and (max-width: 1800px) {
 
.igem_2018_team_content { width: 85%;}
 
.igem_2018_team_content { width: 85%;}
.igem_2018_team_menu {display:block;}
+
.igem_2018_team_menu {display:block;}
 
}
 
}
  
Line 268: Line 259:
 
.parallax {
 
.parallax {
 
     background-image: url("https://orig00.deviantart.net/04e3/f/2012/041/b/1/little_leo_walking_21_frames_by_luigil-d4oqka5.gif");
 
     background-image: url("https://orig00.deviantart.net/04e3/f/2012/041/b/1/little_leo_walking_21_frames_by_luigil-d4oqka5.gif");
     height: 200px;  
+
     height: 200px;
 
     background-attachment: fixed;
 
     background-attachment: fixed;
 
     background-position: center;
 
     background-position: center;

Revision as of 07:45, 11 July 2018