-
Notifications
You must be signed in to change notification settings - Fork 0
/
resumeLog.js
executable file
·53 lines (51 loc) · 1.79 KB
/
resumeLog.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
// /**
// * Created by asus-pc on 2017/4/30.
// */
$(window).load(function () {
//刷新页面让其停留在顶部
$(function(){
setTimeout(function(){window.scrollTo(0,0);}, 50);
});
var centerTop=($(window).height()-$("#login,#signin").height())/2;
var centerLeft=($(window).width()-$("#login,#signin").width())/2;
$("#login,#signin").css('left',centerLeft+"px").css('top',centerTop+"px");
$(window).resize(function () {
var centerTop=($(window).height()-$("#login,#signin").height())/2;
var centerLeft=($(window).width()-$("#login,#signin").width())/2;
$("#login,#signin").css('left',centerLeft+"px").css('top',centerTop+"px");
});
$(".logIn").click(function () {
$("#login").css('display','block')
});
$(".login-close").click(function () {
$("#login").css('display','none')
});
$(".signIn").click(function () {
$("#signin").css('display','block')
});
$(".signin-close").click(function () {
$("#signin").css('display','none')
});
//倒计时10s的实现
$(" .verify span").click(function () {
$(".verify span").css('display','none');
$(".verify-again").css('display','block');
var $time=$(".verify-again span");
var time=10;
timeOut();
function timeOut() {
if($time.text()==0){
$(".verify span").css('display','block');
$(".verify-again").css('display','none');
}
else if($time.text()<=10){
setTimeout(function () {
time--;
$(".verify-again span").text(time);
timeOut();
}
,1000)
}
}
});
});