-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdropbox.js
More file actions
44 lines (44 loc) · 1.85 KB
/
dropbox.js
File metadata and controls
44 lines (44 loc) · 1.85 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
$(document).ready(function() {
$('.reg-box').children().attr('disabled', 'disabled');
$('.login-box').children().attr('disabled', 'disabled');
$('.btn').click(function() {
if(!$('.login-box').is(':visible'))
{
$('.reg-box').children().attr('enabled', 'enabled');
$('.reg-box').slideDown("slow");
$('#regBtn').attr("onClick", "");
$('#name-focus').focus();
}});
$('#sign_in').click(function() {
if (!$('.login-box').is(':visible')) {
// show the login form
if ($('.reg-box').is(':visible')) {
// get rid of the registration fields
$('.reg-box').slideUp("slow");
}
$('.reg-box').children().attr('disabled', 'disabled');
$('#sign_in').text('Sign up');
$('#regBtn').text('Sign in');
$('.login-box').children().attr('enabled', 'enabled');
$('.login-box').slideDown("slow");
$('#regBtn').attr("onClick", "");
$('#regBtn').attr("name", "login");
$('#regBtn').attr("form", "loginform");
$('#email-focus').focus();
} else {
// show the registration forms
$('.login-box').children().attr('disabled', 'disabled');
$('.login-box').slideUp("slow");
$('.reg-box').children().attr('enabled', 'enabled');
$('#sign_in').text('Sign in');
$('#regBtn').text('Sign up');
$('.reg-box').slideDown("slow");
$('#regBtn').attr("onClick", "");
$('#regBtn').attr("name", "register");
$('#regBtn').attr("form", "registerform");
$('#name-focus').focus();
}
// deselect the link
this.blur();
});
});