$(".toggle-password").click(function() {

  $(this).toggleClass("fa-eye fa-eye-slash");
  var input = $($(this).attr("toggle"));
  if (input.attr("type") == "password") {
    input.attr("type", "text");
  } else {
    input.attr("type", "password");
  }
});

$(function(){
  $('#datepicker').datepicker();
});

$("#datepicker").click(function(){
  $("#date").addClass("showing");
});

$(".Hidebutn").click(function(){
  $(".Hidearea").addClass("showings");
});
function toggleSidebar(ref){
  document.getElementById("sidebar").classList.toggle('active');
}


//Multiple options dropdown
//https://codepen.io/gatoledo1/pen/QWmpWjK

const optionMenu = document.querySelector(".select-menu"),
  selectBtn = optionMenu.querySelector(".select-btn"),
  options = optionMenu.querySelectorAll(".option"),
  sBtn_text = optionMenu.querySelector(".sBtn-text");

selectBtn.addEventListener("click", () =>
  optionMenu.classList.toggle("active")
);

options.forEach((option) => {
  option.addEventListener("click", () => {
    let selectedOption = option.querySelector(".option-text").innerText;
    sBtn_text.innerText = selectedOption;

    optionMenu.classList.remove("active");
  });
});
document.getElementById('donationForm').addEventListener('submit', function (event) {
    event.preventDefault();
    alert('Form submitted!');
  });
  
  document.querySelector('.back-btn').addEventListener('click', function () {
    alert('Going back to the previous step');
  });



  