Difference between revisions of "Template:SJTU-Software/teamJs"
Ricky chen (Talk | contribs) (Created page with "$(document).ready(function(){ $(".fixed-nav").css("top",$(window).height()*0.3); $("html").niceScroll(); $('.membersNav').click(changePage); }); var changePage = functi...") |
Ricky chen (Talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
$("html").niceScroll(); | $("html").niceScroll(); | ||
$('.membersNav').click(changePage); | $('.membersNav').click(changePage); | ||
+ | $('img').click(show); | ||
+ | $('.colorful').click(hide) | ||
}); | }); | ||
var changePage = function(){ | var changePage = function(){ | ||
Line 12: | Line 14: | ||
$("."+active).css("display","none"); | $("."+active).css("display","none"); | ||
}) | }) | ||
+ | } | ||
+ | |||
+ | var show = function(){ | ||
+ | var target = $(this).attr("id"); | ||
+ | target = "#"+target+"2"; | ||
+ | $(target).css("width","100%"); | ||
+ | $(target).css("-webkit-transform","rotate(360deg)"); | ||
+ | $(target).css("display","block") | ||
+ | } | ||
+ | |||
+ | var hide = function(){ | ||
+ | $(this).css("width","0"); | ||
+ | |||
} | } |
Latest revision as of 11:03, 18 September 2015
$(document).ready(function(){ $(".fixed-nav").css("top",$(window).height()*0.3); $("html").niceScroll(); $('.membersNav').click(changePage); $('img').click(show); $('.colorful').click(hide) }); var changePage = function(){ var active = $(this).attr("id"); var bros = $(this).siblings(); $("."+active).css("display","inline"); bros.each(function(){ active = $(this).attr("id"); $("."+active).css("display","none"); }) }
var show = function(){ var target = $(this).attr("id"); target = "#"+target+"2"; $(target).css("width","100%"); $(target).css("-webkit-transform","rotate(360deg)"); $(target).css("display","block") }
var hide = function(){ $(this).css("width","0");
}