Team:HZAU-China/Team

From 2013.igem.org

(Difference between revisions)
Line 87: Line 87:
//mouseleave代码段
//mouseleave代码段
$(this).find(".item-t1").stop(true).animate({"margin-top":0},300);
$(this).find(".item-t1").stop(true).animate({"margin-top":0},300);
 +
});
 +
 +
})  
 +
})
 +
</script>
 +
<script>
 +
$(document).ready(function(){
 +
var changeH=$(".item-t2").outerHeight();//变化的高度
 +
$(".itemwrap .item").each(function(index){
 +
$(this).hover(function(){
 +
//mouseenter代码段
 +
$(this).find(".item-t2").stop(true).animate({"margin-top":-changeH},300);
 +
},function(){
 +
//mouseleave代码段
 +
$(this).find(".item-t2").stop(true).animate({"margin-top":0},300);
});
});

Revision as of 12:53, 12 September 2013