Team:ZJU-China/JS/wiki.js
From 2014.igem.org
(Difference between revisions)
Line 32: | Line 32: | ||
); | ); | ||
+ | /* Nagavitor Script */ | ||
+ | |||
+ | $("ul#side_nav li").click(function () { | ||
+ | $.scrollTo($(this).attr("href"), 800); | ||
+ | }); | ||
+ | $("span.guide img").click(function () { | ||
+ | $.scrollTo($(this).attr("href"), 600); | ||
+ | }); | ||
+ | $("img#home_bar").click(function () { | ||
+ | $.scrollTo($(this).attr("href"), 600); | ||
+ | }); | ||
/* move the footer to the right place */ | /* move the footer to the right place */ |
Revision as of 14:33, 15 October 2014
/* hide the white moji "team" */ $(".left-menu li:last-child").css('color', 'transparent');
$(document).ready(function () {
$("li#igem_edit").click(function () { if ($("li#igem_edit").attr('class') === 'edit_on') { $("#top-section").css('background-color', 'transparent'); $("#menubar a:link, #menubar a:active, #menubar a:visited, #menubar a:hover, #menubar:hover").removeAttr("style"); } else { $("#top-section").css('background-color', '#4480ff'); $("#menubar a:link, #menubar a:active, #menubar a:visited").css('color', '#fff'); } $("li#igem_edit").toggleClass("edit_on"); });
/*display of menu*/ $("ul.zju_menu_list > li").hover( function () { $(this).children("ul.zju_sub_menu").show(300); }, function () { $(this).children("ul.zju_sub_menu").hide(200); } ); $("ul.zju_sub_menu > li").hover( function () { $(this).children("ul.zju_son_menu").show(300); }, function () { $(this).children("ul.zju_son_menu").hide(100); } ); /* Nagavitor Script */ $("ul#side_nav li").click(function () { $.scrollTo($(this).attr("href"), 800); }); $("span.guide img").click(function () { $.scrollTo($(this).attr("href"), 600); }); $("img#home_bar").click(function () { $.scrollTo($(this).attr("href"), 600); }); /* move the footer to the right place */ $("#footer-box").prepend($("div.zju_footer")); /* hide and show media wiki */ $("span#mediawikilogo").click(function () { $("div#footer").toggle("normal"); });
});