$(document).ready(function () { $(".navbar-nav a").on("click", function () { $(".navbar-collapse").collapse("hide"); }); $("#show_hide_password a").on("click", function (event) { event.preventDefault(); if ($("#show_hide_password input").attr("type") == "text") { $("#show_hide_password input").attr("type", "password"); $("#show_hide_password i").addClass("fa-eye-slash"); $("#show_hide_password i").removeClass("fa-eye"); } else if ($("#show_hide_password input").attr("type") == "password") { $("#show_hide_password input").attr("type", "text"); $("#show_hide_password i").removeClass("fa-eye-slash"); $("#show_hide_password i").addClass("fa-eye"); } }); }); document .querySelector(".custom-file-input") .addEventListener("change", function (e) { var fileName = document.getElementById("fw-update-file").files[0].name; var nextSibling = e.target.nextElementSibling; nextSibling.innerText = fileName; });