lixin-web
Version:
vue and bootstrap
31 lines (27 loc) • 837 B
JavaScript
$(document).ready(function() {
//入场动画
!function(){
$('.c2 .d .dd').addClass('wow fadeIn');
new WOW().init();
}();
//点击动画
!function(){
//点击左边列表动画
$(".a2 .c1 .d1").click(function(){
$(".a2 .c2 .d").eq($(this).index()).show().siblings().hide();
$(this).addClass('bg').siblings().removeClass('bg');
}).eq(0).click()
//banner列表动画
var pos = [];
$('.c2 .d .dd').each(function(idx){
pos[idx] = $(this).offset().top;
});
$('.c2 .d .dd .e1').click(function(){
var top = pos[$(this).parent().index()];
$(this).next().stop().slideToggle();
$('.c2 .d .dd .e1').not($(this)).next().slideUp();
$('html,body').animate({scrollTop: top - 100}, 500);
$(this).children().find(".g2").toggleClass("transformt");
})
}();
});