Plugins Area on "[Plugin: Booking Ultra Pro Appointments Plugin] BUG: Choosing Business Hours Bad javascript"

ساخت وبلاگ

Everytime you select a start time for business hours it hides the end time.

admin/scripts/admin.js
Your bug is in this function, please review

var $form = $('#business-hours'); jQuery(document).on("click", ".bup_select_start", function(e) { //$('.bup_select_start').on('change', function () { var $row = $(this).parent(), $end_select = $('.bup_select_end', $row), $start_select = $(this); if ($start_select.val()) { $end_select.show(); $('span', $row).show(); var start_time = $start_select.val(); $('span > option', $end_select).each(function () { $(this).unwrap(); }); // Hides end time options with value less than in the start time $('option', $end_select).each(function () { if ($(this).val() <= start_time) { $(this).wrap("<span>").parent().hide(); } }); if (start_time >= $end_select.val()) { $('option:visible:first', $end_select).attr('selected', true); } } else { // OFF $end_select.hide(); $('span', $row).hide(); } }).each(function () { var $row = $(this).parent(), $end_select = $('.bup_select_end', $row); $(this).data('default_value', $(this).val()); $end_select.data('default_value', $end_select.val()); // Hides end select for "OFF" days if (!$(this).val()) { $end_select.hide(); $('span', $row).hide(); } }).trigger('change');

https://wordpress.org/plugins/booking-ultra-pro/

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 329 تاريخ : يکشنبه 3 مرداد 1395 ساعت: 4:15