INIT
This commit is contained in:
34
assets/js/app-ecommerce-settings.js
Normal file
34
assets/js/app-ecommerce-settings.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* 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'
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user