$(".warningCloseBtn").click(function () { // When arrow is clicked $(".warningBg").hide(); }); function formatText(icon) { return $( ' ' + icon.text + "" ); } $(".inputSelect2icon").select2({ width: "50%", 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"]'); $checkboxes.change(function () { var candidates = $(this).data("candidates"); $(".candidatesItemDetailNone").hide(); $("." + candidates).show(); $(".candidatesWrap ").removeClass("active"); $(this).parent().parent().addClass("active"); var countCheckedCheckboxes = $checkboxes.filter(":checked").length; $(".countCheckText").text(countCheckedCheckboxes); if (countCheckedCheckboxes == "0") { $(".checkSelectDetail").hide(); } else { $(".checkSelectDetail").fadeIn(); } }); $(function ($) { let url = window.location.href; $(".deskTopShow a").each(function () { if (this.href === url) { $(this).closest("a").addClass("active"); } }); }); $(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 }); $(document).on("change", ".adsStatus", function () { var $adsStatusboxes = $(this); console.log("hi"); var countCheckedCheckboxes = $adsStatusboxes.filter(":checked").length; $(".countCheckText").text(countCheckedCheckboxes); if (countCheckedCheckboxes == "0") { $(".checkSelectDetail").hide(); } else { $(".checkSelectDetail").fadeIn(); } // 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"); } }); // $('.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"); });