You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
website/js/index.js

24 lines
916 B

function animationShow(a, t, n) {
a.hasClass("animated") && !a.hasClass(t) && setTimeout(function (a) {
return function () {
a.addClass(t)
}
}(a), n || 400)
}
$(document).ready(function(){
$(".detailicon").hover(function(){
$(this).find('img').animate({top:'-25px'});
},function () {
$(this).find('img').animate({top:'0'});
});
$(".list").click(function () {
$(this).addClass("on").siblings().removeClass("on");
$(this).attr("toUrl") && (location.href = $(this).attr("toUrl"));
});
//导航栏颜色随着高度(.ban)进行改变
$(window).scroll(function () {
var a = $(document).scrollTop(), t = $(".ban").height();
a > t - 40 ? $(".header").addClass("bannerChange") && $(".logo").addClass("logo-choose") : $(".header").removeClass("bannerChange")&& $(".logo").removeClass("logo-choose");
});
});