/
eve_2108.js
72 lines (52 loc) · 1.65 KB
/
eve_2108.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
$(function(){
$('.up_link_out').on('click',function(){
$('body, html').animate({ scrollTop: 0 }, 500);
return false;
});
$('.p_img_pop').on('click',function(){
$('.pop,.pop_in').fadeIn(500);
});
$('.p_icon').on('click',function(){
Tmp=$(this).attr('id');
$('.p_box_detail').hide();
$('#p'+Tmp).show();
});
$('.pop,.pop_back').on('click',function(){
$('.pop,.pop_in').fadeOut(500);
});
$('.img_back1').delay(100).fadeIn(1000);
$('.img_back2,.img_back3').delay(1100).fadeIn(10);
$(window).scroll(function() {
var Width = $(window).width();
var Height = $(window).height();
Tmp=$(this).scrollTop();
if(Tmp < 0){
Tmp=0;
}
if(Tmp>500){
$('.up_link_out').fadeIn(200);
}else{
$('.up_link_out').fadeOut(200);
}
Base_y= (Width*0.55)*(-1)+ Tmp*1.3;
S0=Math.floor(Tmp/5);
Tmp_b=$('#canvas2').offset().top-$('.up_link_out').offset().top;
if(Tmp>$('#canvas2').offset().top-$(window).height()+$('.up_link_out').height()){
$('.up_link_out').removeClass('out_e').css({'position':'absolute','top':$('#canvas2').offset().top+10});
}else{
$('.up_link_out').addClass('out_e').css({'position':'fixed','top':'auto'});
}
$('.up_link').css({'transform':'rotate('+S0+'deg)'});
$('.img_back1').stop(false, true).animate({'top':Base_y},10);
if(Tmp > $('.box_3').offset().top){
$('.img_back3').css('z-index','0');
$('.img_back2,.img_back1').css('z-index','-1');
}else if(Tmp > $('#list_1').offset().top){
$('.img_back2').css('z-index','0');
$('.img_back1,.img_back3').css('z-index','-1');
}else{
$('.img_back1').css('z-index','0');
$('.img_back2,.img_back3').css('z-index','-1');
}
});
});