Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/html/js/add-properties.js
Назад
$(function () { // Function to initialize SmartTab function initSmartTab() { $('#smarttab').smartTab({ selected: 0, // Set the selected tab to 0 (first tab) backButtonSupport: true, enableUrlHash: false, // navigation : false, enableNavigation: false, // navigation: false, // Disable navigation transition: { animation: 'slide-horizontal', // Slide effect }, autoAdjustHeight: false, autoProgress: { // Auto navigate tabs on interval enabled: false, // Enable/Disable Auto navigation interval: 3500, // Auto navigate Interval (used only if "autoProgress" is enabled) stopOnFocus: true, // Stop auto navigation on focus and resume on outfocus }, }); $('#smarttab').on('showTab', function (e, anchorObject, tabIndex) { // Check if the first tab is shown if (tabIndex === 0) { $('#prev-btn').hide(); } else { $('#prev-btn').show(); } // $('#smarttab .nav-link').eq(tabIndex - 1).addClass('active'); // if (tabIndex === 4) {//for last tab // $('#prev-btn').hide(); // } }); $('#prev-btn').on('click', function () { $('#smarttab').smartTab('prev'); }); $('#next-btn').on('click', function () { $('#smarttab').smartTab('next'); }); } // Initialize SmartTab initSmartTab(); // tab end // $(document).ready(function() { // Disable navigation links // }); $('#datepicker').datepicker({ format: 'mm/dd/yyyy', autoclose: true, }); // Function to close all select options let currentOpenSelect = null; // Function to close all select options function closeSelectOptions() { $(".select-options").slideUp(); $('.select-arrow').removeClass('active') } $(".select-selected, .select-arrow").on("click", function (e) { e.stopPropagation(); const $customSelect = $(this).closest(".custom-select"); const $selectOptions = $customSelect.find(".select-options"); if (currentOpenSelect && currentOpenSelect[0] !== $customSelect[0]) { // Close the previously opened select closeSelectOptions(); } currentOpenSelect = $customSelect; $(this).next('.select-arrow').toggleClass('active'); $selectOptions.slideToggle(); }); $(".select-option").on("click", function () { const value = $(this).data("value"); const text = $(this).text(); const $customSelect = $(this).closest(".custom-select"); const isMultiple = $customSelect.data("multiple"); if (isMultiple) { $(this).toggleClass("selected"); const selectedOptions = $customSelect .find(".select-option.selected") .map(function () { return $(this).data("value"); }) .get(); $customSelect.find(".select-selected").text(selectedOptions.join(", ")); $customSelect.find(".select-selected").attr("data-value", selectedOptions.join(", ")); selectValidation();//IF NULL } else { $customSelect.find(".select-selected").text(text); $customSelect.find(".select-selected").attr("data-value", value); $(".select-selected").addClass('selected-opt') closeSelectOptions(); // Close the options panel selectValidation(); // You can customize the behavior when an option is selected here console.log("Selected Value:", value); } }); // Close the dropdowns when clicking outside $(document).on("click", function () { closeSelectOptions(); }); $(".v-select-all").on("click", function () { closeSelectOptions(); }); // Prevent clicks inside the dropdown from closing it $(".select-options").on("click", function (e) { e.stopPropagation(); }); $('#datepicker').datepicker({ format: 'mm/dd/yyyy', autoclose: true, }); $('#datepicker2').datepicker({ format: 'mm/dd/yyyy', autoclose: true, }); $('.slect-all-btn').click(function () { $('input[name="amenities"]').prop('checked', true); if ($('input[name="amenities"]:checked').length === 0) { $('.selected-btn').prop("disabled", true); } else { $('.selected-btn').prop("disabled", false); } }); $('input[name="amenities"]').on('change', function () { var radioValues = $('input[name="amenities"]:checked').map(function () { return $(this).val(); }).get(); console.log('Selected radio button values:', radioValues); var getValue = 'wifi'; if (radioValues.includes(getValue)) { console.log('The value ' + getValue + ' is selected.'); } $('.selected-btn').prop("disabled", false); if ($('input[name="amenities"]:checked').length === 0) { $('.selected-btn').prop("disabled", true); } else { $('.selected-btn').prop("disabled", false); } }); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка