Skip to content

Commit 89a21f0

Browse files
authored
Add files via upload
1 parent ca3ae3a commit 89a21f0

File tree

2 files changed

+134
-0
lines changed

2 files changed

+134
-0
lines changed

css/style.css

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
body{
2+
font-family: source sans pro, sans-serif;
3+
font-size: 14px;
4+
line-height: 1.5;
5+
color: #222;
6+
text-align: center;
7+
}
8+
h1,h2,h3{
9+
color: #333;
10+
text-align: center;
11+
font-weight: 200;
12+
}
13+
#container{
14+
width :40%;
15+
margin: 0 auto;
16+
margin-top: 100px;
17+
padding: 10px;
18+
background-color: #ECF0F5;
19+
}
20+
#form{
21+
border-radius: 4px;
22+
}
23+
#alert{
24+
background-color: #00A65A;
25+
height: auto;
26+
text-align: left;
27+
border-radius:4px;
28+
margin-top:15px;
29+
margin-bottom:10px;
30+
padding: 5px;
31+
color: #FFF;
32+
}
33+
#foot{
34+
text-decoration:none;
35+
font-size: 14px;
36+
color:#88A1BF;
37+
}
38+
39+
.hiden{
40+
display: none;
41+
}
42+
p{
43+
margin-top:10px;
44+
margin-bottom: 10px;
45+
font-size: 16px;
46+
line-height: 1.4;
47+
font-style: italic;
48+
color: #888;
49+
}
50+
input[type=text]{
51+
width:100%;
52+
height:40px;
53+
margin-top:10px;
54+
border:solid white 1px;
55+
transition:1s;
56+
padding:5px;
57+
}
58+
input[type=text]:hover{
59+
border: solid #3c8dbc 1px;
60+
transition:1s;
61+
}
62+
input[type=text]:focus{
63+
border: solid #3c8dbc 1px;
64+
transition:1s;
65+
}
66+
textarea{
67+
width:100%;
68+
height:60px;
69+
margin-top:10px;
70+
border:solid white 1px;
71+
padding:5px;
72+
resize:none;
73+
transition: 1s;
74+
}
75+
textarea:hover{
76+
border: solid #3c8dbc 1px;
77+
transition:1s;
78+
}
79+
textarea:focus{
80+
border: solid #3c8dbc 1px;
81+
transition:1s;
82+
}
83+
input[type=button]{
84+
width:100%;
85+
height:40px;
86+
margin:20px 0 20px 0;
87+
background-color:#00C0EF;
88+
border:1px solid white;
89+
font-size:18px;
90+
color: white;
91+
transition: 1s;
92+
}
93+
input[type=button]:hover{
94+
background-color:#3c8dbc;
95+
transition: 1s;
96+
}

js/form.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
$(document).ready(function(){
2+
$("#submit").click(function(){
3+
var name = $("#name").val();
4+
var msg = $("#msg").val();
5+
6+
if(name ==''|| msg==''){
7+
alert("Some fields are blank");
8+
}
9+
else{
10+
// Returns successful data submission message when the entered information is stored in database.
11+
$.post("process.php",{
12+
Name: name,
13+
Message: msg
14+
},
15+
function(data) {
16+
//alert(data);
17+
$('#form')[0].reset(); //To reset form fields after submission
18+
19+
$('#alert').animate({ //for fade in animation
20+
opacity:'show',
21+
height:'show',
22+
marginTop:'show',
23+
marginBottom:'show',
24+
paddingTop:'show',
25+
paddingBottom:'show'
26+
});
27+
28+
$('#alert').fadeTo(2000,500).slideUp(500,function(){ //fade out
29+
$('#alert').addClass('hiden'); //adds a class .hidden
30+
});
31+
32+
});
33+
34+
}
35+
});
36+
});
37+
38+

0 commit comments

Comments
 (0)