forked from tushargupta1504/Medical-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script3.js
57 lines (55 loc) · 1.49 KB
/
script3.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
54
55
56
57
function validateInputs(){
var fullName=document.getElementById('name').value;
var email=document.getElementById('email').value;
var password=document.getElementById('password').value;
if (fullName==='') {
alert("Name is required");
return false;
}else{
true;
}
if (email===''){
alert("Email is required");
return false;
}
else{
true;
}
if (password===''){
alert("password is required");
return false;
}else{
alert("Registered successfully");
}
}
function validateInputs1(){
var email=document.getElementById('email').value;
var password=document.getElementById('password').value;
if (email===''){
alert("Email is required");
return false;
}
else{
true;
}
if (password===''){
alert("password is required");
return false;
}else{
alert("Registered successfully");
}
}
function triggerSlidingEffect() {
// On image click
document.querySelectorAll('#gallery .image-container img').forEach(img => {
img.addEventListener('click', function() {
this.classList.toggle('sliding'); // Add or remove sliding effect
});
});
// On scroll
window.addEventListener('scroll', () => {
document.querySelectorAll('#gallery .image-container img').forEach(img => {
img.classList.add('sliding'); // Add sliding effect on scroll
});
});
}