-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContactus.js
38 lines (31 loc) · 977 Bytes
/
Contactus.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
$('document').ready(function(){
$('input[type="text"], input[type="email"], textarea').focus(function(){
var background = $(this).attr('id');
$('#' + background + '-form').addClass('formgroup-active');
$('#' + background + '-form').removeClass('formgroup-error');
});
$('input[type="text"], input[type="email"], textarea').blur(function(){
var background = $(this).attr('id');
$('#' + background + '-form').removeClass('formgroup-active');
});
function errorfield(field){
$(field).addClass('formgroup-error');
console.log(field);
}
$("#waterform").submit(function() {
var stopsubmit = false;
if($('#name').val() == "") {
errorfield('#name-form');
stopsubmit=true;
}
if($('#email').val() == "") {
errorfield('#email-form');
stopsubmit=true;
}
if(stopsubmit) return false;
});
});
function myfunc(){
document.write ("Thanks for contacting we will reach you soon." )
//document.fonts(ResizeObserverSize)
}