JQuery hanya berfungsi pada klik ganda

$(document).ready(function() {
  $(document).click(function(e) {
  e.preventDefault();
    if (
      !$(e.target).hasClass("header-disableProfileIcon") &&
      $(e.target).parents(".header-user-profile-menu").length === 0
    ) {
      $(".header-user-profile-menu").hide();
      $(".header-disableProfileIcon").removeClass(
        "header-enableProfileIcon"
      );
      $(".header-disableProfileIcon").off("dblclick");
    }
    e.stopPropagation();
  });
});
Sleepy Squirrel