Codestyle fixes for contact.js.
This commit is contained in:
parent
d3cccf8148
commit
0cc5ae3e80
2 changed files with 6 additions and 5 deletions
|
|
@ -37,6 +37,7 @@ footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Underline all links.
|
||||||
:link,
|
:link,
|
||||||
:visited {
|
:visited {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,15 @@
|
||||||
$('.contact-no-js').detach();
|
$('.contact-no-js').detach();
|
||||||
|
|
||||||
// Wait for a mouse to move, indicating they are human.
|
// Wait for a mouse to move, indicating they are human.
|
||||||
$('body').mousemove(function() {
|
$('body').mousemove(function () {
|
||||||
// Unlock the form.
|
// Unlock the form.
|
||||||
$contact_form.attr('action', contact_action);
|
$contact_form.attr('action', contact_action);
|
||||||
$contact_button.attr('disabled', false);
|
$contact_button.attr('disabled', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
// A tab or enter key pressed can also indicate they are human.
|
// A tab or enter key pressed can also indicate they are human.
|
||||||
$('body').keydown(function(e) {
|
$('body').keydown(function (e) {
|
||||||
if ((e.keyCode == 9) || (e.keyCode == 13)) {
|
if ((e.keyCode === 9) || (e.keyCode === 13)) {
|
||||||
// Unlock the form.
|
// Unlock the form.
|
||||||
$contact_form.attr('action', contact_action);
|
$contact_form.attr('action', contact_action);
|
||||||
$contact_button.attr('disabled', false);
|
$contact_button.attr('disabled', false);
|
||||||
|
|
@ -40,8 +40,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Display messages.
|
// Display messages.
|
||||||
if (location.search.substring(1) != '') {
|
if (location.search.substring(1) !== '') {
|
||||||
switch(location.search.substring(1)) {
|
switch (location.search.substring(1)) {
|
||||||
case 'submitted':
|
case 'submitted':
|
||||||
$('.contact-submitted').removeClass('hidden');
|
$('.contact-submitted').removeClass('hidden');
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue