$(".warningCloseBtn").click(function () { // When arrow is clicked $(".succseeMessage").hide(); $(".warningMessage").hide(); }); $(".succseeCloseBtn").click(function () { // When arrow is clicked $(this).parent().parent().hide(); }); function formatText(icon) { return $( ' ' + icon.text + "" ); } $(".navbar-toggler").click(function () { $(".navbar").addClass("fixedMobileNav"); }); $(".loginBtn").click(function () { $(".dropdownSub").css("display","none"); $(".navbar-collapse").removeClass("show"); $(".fa-chevron-down").removeClass("rodate180"); }); jQuery(function() { jQuery(".form_date").datepicker({}).attr('readonly', 'readonly'); }); $(".inputSelect2icon").select2({ width: "50%", searchInputPlaceholder: 'Search', templateSelection: formatText, templateResult: formatText, }); $(".form_date").datepicker({ format: "dd M yyyy", }); $(".inputSelect2").select2(); // Dropdown toggle $(".dropdownSub-toggle").click(function () { $(this).next(".dropdownSub").toggle(); $(this).find(".fa-chevron-down").toggleClass("rodate180"); }); $(document).click(function (e) { var target = e.target; if ( !$(target).is(".dropdownSub-toggle") && !$(target).parents().is(".dropdownSub-toggle") ) { $(".dropdownSub").hide(); $(".dropdownSub-toggle .fa-chevron-down").removeClass("rodate180"); } }); $(".multiselectGroup").click(function () { $(this) .find(".doneBtn") .appendTo($(this).find(".multiselect-container li:last-child")); }); $(".addSelectGroup").click(function () { $(this).find(".addBtn").appendTo($(this).find(".input-group-btn")); $(this).find(".multiselect-container li:nth-child(2)").hide(); }); $(".multiselectGroupIcon").click(function () { $(this) .find(".doneBtn") .appendTo($(this).find(".multiselect-container li:last-child")); }); $(document).on("click", ".searchBtn", function () { $(".nav").addClass("overNav"); $(".serchBar").slideDown(); $(".subMenu").slideUp(); $("#cLogo").attr("class", "showInline"); $("#wLogo").attr("class", "hide"); }); $(".password").password({ eyeClass: "fa", eyeOpenClass: "fa-eye", eyeCloseClass: "fa-eye-slash", message: "keep your password security", }); $(".checkSelectDetail").hide(); var $checkboxes = $('.candidatesCheckBox[type="checkbox"]'); $(".candidatesWrap").click(function () { $(this).find(".h3").addClass("active"); var candidates = $(this).data("candidates"); $(".candidatesItemDetailNone").hide(); $(".delectNotCandidateMessage").hide(); $(".delectCandidateMessage").hide(); $(".statusCandidateMessage").hide(); $(".moveFolderMessage").hide(); $(".marksmoveFolderMessage").hide(); $(".markstatusMessage").hide(); $("." + candidates).show(); $(".candidatesWrap").removeClass("active"); $(this).addClass("active"); $('.candidatesDetail').animate({scrollTop: 0}); var countCheckedCheckboxes = $checkboxes.filter(":checked").length; $(".countCheckText").text(countCheckedCheckboxes); if (countCheckedCheckboxes == "0") { $(".checkSelectDetail").hide(); } else { $(".checkSelectDetail").fadeIn(); } if (countCheckedCheckboxes < "5") { $("#selectAll").prop('checked', false); }else{ $("#selectAll").prop('checked', true); } }); $(function ($) { let url = window.location.href; $(".deskTopShow a").each(function () { if (this.href === url) { $(this).closest("a").addClass("active"); } }); $(".mobileShow .dropdownSub a").each(function () { if (this.href === url) { $(".mobileShow .dropdownSub a").removeClass("active"); $(this).closest("a").addClass("active"); } }); }); $(function () { const $menu = $('.customSelect'); const $menuli = $('.customSelect').children("li:not(.init)");; $(document).mouseup(e => { if (!$menu.is(e.target) // if the target of the click isn't the container... && $menu.has(e.target).length === 0) // ... nor a descendant of the container { $menuli.css('display', 'none'); } }); }); $(document).on("click", ".jobAdWrap", function () { $(".jobAdWrap ").removeClass("active"); $(this).addClass("active"); $(".jobPreviewDetailNone").hide(); $(".jobPreviewDetail").show(); // Does some stuff and logs the event to the console }); $('input:radio[name="planGroup"]').change(function () { if ($("#exPlan").is(":checked")) { $(".planDes").addClass("d-inlineblock"); } else { $(".planDes").removeClass("d-inlineblock"); } }); $('input:radio[name="folderSelectRadio"]').change(function () { $(".folderSelectRadio").removeClass("active"); // $(".deleteFolderDetail").hide(); $(this).parent().parent().addClass("active"); // $(this).parent().parent().find(".deleteFolderDetail").show(); }); // $(document).on("click", ".deleteFolderDetailBtn", function () { // alert("Belt Collins International (HK) Limited will be delete"); // // Does some stuff and logs the event to the console // }); // $('.checkBoxSelect2').select2({ // closeOnSelect: false, // placeholder: "All folders", // }) // $('.checkBoxSelect2').on('select2:close', function() { // let select = $(this); // $(this).next('span.select2').find('ul').html(function() { // let count = select.select2('data').length; // console.log(count); // $(".select2-selection__rendered").show(); // return "
  • " + count + " selected
  • "; // }) // }) // $('.checkBoxSelect2').on('select2:open', function() { // $(this).parent().find(".select2-selection__rendered").hide(); // $(this).parent().find(".doneBtn").show().appendTo($(".select2-results")); // }) // $(".customSelect").on("click", ".init", function () { // $(this).closest("ul").children("li:not(.init)").toggle(); // }); // var allOptions = $(".customSelect").children("li:not(.init)"); // $(".customSelect").on("click", "li:not(.init)", function () { // allOptions.removeClass("selected"); // $(this).addClass("selected"); // $(".customSelect") // .children(".init") // .css("color", "#333") // .html($(this).html()); // allOptions.toggle(); // }); $(".countText").keyup(updateCount); function updateCount() { var cs = $(this).val().length; $(this).labels("span").text(cs); } $(window).scroll(function () { if ($(window).scrollTop() > 100) { $(".subMenuNavWrap").addClass("fixedSubMenu"); $(".scrollTop").fadeIn(); } else { $(".subMenuNavWrap").removeClass("fixedSubMenu"); $(".scrollTop").fadeOut(); } }); $(".scrollTop").click(function () { // When arrow is clicked $("html").animate( { scrollTop: 0, // Scroll to top of body }, 500 ); }); $(".mobileCloseBtn").click(function () { $(".collapse").removeClass("show"); $(".navbar").removeClass("fixedMobileNav"); });