Template:Team:KIT-Kyoto/UnderBar

From 2014.igem.org

(Difference between revisions)
 
(9 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
$('#SideMenu li')
+
<!--
-
.each(function(){
+
var SideMenuLine='<img src="https://static.igem.org/mediawiki/2014/4/40/KIT_pictures_line.png" class="line_d">';
-
var $li = $(this);
+
// -->
-
if ($li.has('a')) {
+
$(".s-menu li a").append(SideMenuLine).find(".line_d",this).width(0).hide();
-
$li.find('a')
+
$(".s-menu a").hover(function(){
-
.clone()
+
if(!$(this).hasClass("select")){
-
.find('>a').attr('src', function(){
+
$(".line_d",this).stop().show().animate({width:"100%"},500,"easeOutExpo");
-
return $(this).attr('a').replace('_off', '_on')
+
-
})
+
-
.end()
+
-
.css('width', 0)
+
-
.appendTo($li)
+
}
}
-
})
+
},function(){
-
.hover(
+
if(!$(this).hasClass("select")){
-
function(e) {
+
$(".line_d",this).stop().animate({width:0},500,"easeOutExpo",function(){$(this).hide();});
-
$(this).find('a').eq(1).stop()
+
//$("img",this).stop().animate({opacity:1},500);
-
.animate({width:$(this).find('a').width()}, {duration:300, easing:'easeOutExpo'});
+
-
},
+
-
function(e) {
+
-
$(this).find('a').eq(1).stop()
+
-
.animate({width:0}, {duration:300, easing:'easeInCubic'});
+
}
}
-
);
+
});
 +
function nextNaviSet(contents){
 +
//ナビゲーションにクラスを付与
 +
$(".s-menu a.select .line_d").stop().width(0).hide();
 +
$(".s-menu a.select").removeClass("select");
 +
}
</script>
</script>

Latest revision as of 17:52, 20 May 2014