Line 264: | Line 264: | ||
} | } | ||
+ | //收起左侧导航 | ||
+ | var nav_shrink=$("#nav_shrink").eq(0); | ||
+ | var nav_shrink_icon=$("#nav_shrink_icon").eq(0); | ||
+ | var slow_transition=$(".slow-transition"); | ||
+ | var content_right_border=$("#content-right-border").eq(0); | ||
+ | |||
+ | |||
+ | var nav_shrink_func= function () { | ||
+ | var nav_flag=false; | ||
+ | nav_shrink.click(function () { | ||
+ | if(!nav_flag){ | ||
+ | slow_transition.addClass("transform_hide"); | ||
+ | content_right_border.animate({ | ||
+ | 'margin-left':'40px' | ||
+ | },200); | ||
+ | |||
+ | nav_shrink_icon.attr("src","https://static.igem.org/mediawiki/2016/1/17/T--BIT-China--img--pumpkin--expand.png"); | ||
+ | nav_shrink.animate({ | ||
+ | left:'200px' | ||
+ | },200); | ||
+ | |||
+ | nav_flag=true; | ||
+ | } | ||
+ | else{ | ||
+ | slow_transition.removeClass("transform_hide"); | ||
+ | content_right_border.animate({ | ||
+ | 'margin-left':'220px' | ||
+ | },200); | ||
+ | |||
+ | nav_shrink_icon.attr("src","https://static.igem.org/mediawiki/2016/8/8a/T--BIT-China--img--pumpkin--collapse.png"); | ||
+ | nav_shrink.animate({ | ||
+ | left:'90px' | ||
+ | },200); | ||
+ | |||
+ | nav_flag=false; | ||
+ | } | ||
+ | }); | ||
+ | }; | ||
+ | nav_shrink_func(); | ||
//返回顶部 | //返回顶部 |
Revision as of 14:28, 13 November 2016