-
Notifications
You must be signed in to change notification settings - Fork 0
/
moreinfo.js
98 lines (92 loc) · 2.01 KB
/
moreinfo.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
$(document).ready(function() {
moreclick();
closeshade();
infocenter();
});
function infocenter()
{
var width = $('#ready_one').width();
var height = $('#ready_one').height();
console.log(height);
var infoWidth = $('.viaste_info').width();
console.log(infoWidth);
var infoHeight = $('.viaste_info').height();
console.log(infoHeight);
var leftInfo = (width-infoWidth)/2;
var heightInfo = (height-infoHeight)/2;
$('.viaste_info').css("top",heightInfo+"px");
$('.viaste_info').css("left",leftInfo +"px");
$('#jishu').css("top","80px");
}
function moreclick()
{
$('#t3LPWmore_1').click(function()
{
showshade();
showyunyin();
});
$('#t3LPWmore_2').click(function()
{
showshade();
showzuce();
});
$('#t3LPWmore_3').click(function()
{
showshade();
showjishu();
});
$('#t3LPWmore_4').click(function()
{
showshade();
showchuanmei();
});
}
function showshade()
{
$('#viaste_shade').css("display","block")
$("#viaste_shade").animate({opacity:0.85},1000);
};
function hideshade()
{
$("#zuce").animate({opacity:0.0},500);
$("#yunyin").animate({opacity:0.0},500);
$("#jishu").animate({opacity:0.0},500);
$("#chuanmei").animate({opacity:0.0},500);
$("#viaste_shade").animate({opacity:0.0},800);
if ($("#viaste_shade").css("opacity") <= 0.2){
$('#zuce').css("display","none");
$('#yunyin').css("display","none");
$('#jishu').css("display","none");
$('#chuanmei').css("display","none");
$('#viaste_shade').css("display","none");
}
};
function closeshade()
{
$('#viaste_shade').click(function(){
hideshade();
});
$('.viaste_info').click(function(){
hideshade();
});
};
function showzuce()
{
$('#zuce').css("display","block");
$("#zuce").animate({opacity:1},1200);
}
function showyunyin()
{
$('#yunyin').css("display","block");
$("#yunyin").animate({opacity:1},1200);
}
function showjishu()
{
$('#jishu').css("display","block");
$("#jishu").animate({opacity:1},1500);
}
function showchuanmei()
{
$('#chuanmei').css("display","block");
$("#chuanmei").animate({opacity:1},1200);
}