-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript-jquery2.js
More file actions
53 lines (39 loc) · 1.19 KB
/
script-jquery2.js
File metadata and controls
53 lines (39 loc) · 1.19 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
45
46
47
48
49
50
51
52
53
function validateForm() {
var email = $("#email").val();
var password = $("#password").val();
if (email === "" || password === "") {
return false;
}
}
var passwordInput = $("#password");
function togglePassword(event, inputElement, eyeIcon) {
event.preventDefault();
if (inputElement.attr("type") === "password") {
inputElement.attr("type", "text");
eyeIcon.removeClass("fa-eye");
eyeIcon.addClass("fa-eye-slash");
} else {
inputElement.attr("type", "password");
eyeIcon.removeClass("fa-eye-slash");
eyeIcon.addClass("fa-eye");
}
}
$("#pass-toggle-btn").on("click", function(event) {
togglePassword(event, $("#password"), $("#pass-toggle-btn"));
});
var page = window.location.pathname.split("/").pop();
$(function() {
$(".navigation li a").on("click", function() {
$(".navigation li").removeClass("active");
$(this).parent().addClass("active");
});
if(page == "home.html") {
$(".navigation li").eq(0).addClass("active");
}
if(page == "index2.html") {
$(".navigation li").eq(1).addClass("active");
}
if(page == "index.html") {
$(".navigation li").eq(2).addClass("active");
}
});