2025-04-02 13:24:56 +05:30

35 lines
741 B
JavaScript

/**
* App eCommerce Settings Script
*/
'use strict';
//Javascript to handle the e-commerce settings page
$(function () {
// Select2
var select2 = $('.select2');
if (select2.length) {
select2.each(function () {
var $this = $(this);
$this.wrap('<div class="position-relative"></div>').select2({
dropdownParent: $this.parent(),
placeholder: $this.data('placeholder') // for dynamic placeholder
});
});
}
});
(function () {
// Phone Number
const phoneMaskList = document.querySelectorAll('.phone-mask');
if (phoneMaskList) {
phoneMaskList.forEach(function (phoneMask) {
new Cleave(phoneMask, {
phone: true,
phoneRegionCode: 'US'
});
});
}
})();