deafault.js
2.56 KB
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
$(function () {
// box抖动 弹出学校
$("#box").css('animation', 'box 0.4s')
.on("animationend", function () {
$("#imgschool").show().css('animation', 'school 0.6s');
});
//学校弹出后 显示笔 和下一步按钮
$("#imgschool").on("animationend", function () {
$("#next").animate({ 'opacity': 1 }, 400);
$("#bi").css('animation', 'bi 0.4s');
});
//bi显示后 显示box下面椭圆
$("#bi").on("animationend", function () {
$("#bi").css({ 'right': '0', top: '200px' });
$("#zuo").animate({ 'left': '-15px', top: '360px' }, 400);
// $("#nv").css('animation', 'nv 4s');
$("#nv").animate({ opacity: 1 }, 200);
$("#nan").animate({ opacity: 1 }, 200);
// $("#nan").css({ opacity: 1 });
});
$(".nextToPage").click(function () {
$("#next").css('animation', 'next 0.2s');
});
$("#next").on("animationend", function () {
window.location.href = 'School.html';
});
var winHeight = $(window).height();
var winWidth = $(window).width();
//var bodyWidth = $('body').width();
//var $indexWrap = $('.index-wrap');
//if (winHeight > winWidth * 1.778) {
// $('body').css('height', winHeight);
// $indexWrap.css('top', bodyWidth * 1.473);
//} else {
// if (winHeight <= 480 || winHeight <= winWidth * 1.5) {
// $('body').css('height', bodyWidth * 1.778);
// } else {
// $('body').css('height', winHeight);
// }
// $indexWrap.css('bottom', bodyWidth * 0.2);
//}
//规则说明
var $rule = $('#rule');
var $coverBg = $('.cover-bg');
var $ruleOpen = $('#note');
//var $ruleOpen = $('.index-rule-open');
$coverBg.fadeIn(300);
$rule.removeClass('hide').addClass('show');
$rule.show();
$rule.on('touchend click', '.rule-close', function (e) {
e.preventDefault();
$coverBg.fadeOut(300);
$rule.removeClass('show').addClass('hide');
setTimeout(function () {
$rule.hide();
}, 200);
//$ruleOpen.css('top', '20px');
});
$coverBg.on('touchend', function () {
$coverBg.fadeOut(300);
$rule.removeClass('show').addClass('hide');
setTimeout(function () {
$rule.hide();
}, 200);
//$ruleOpen.css('top', '20px');
});
$ruleOpen.on('touchend', function () {
$coverBg.fadeIn(300);
$rule.removeClass('hide').addClass('show');
$rule.show();
//$ruleOpen.css('top', '40px');
});
});