mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
714 B
JavaScript
18 lines
714 B
JavaScript
window.addEventListener('load', function () {
|
|
document.querySelectorAll('.live-card-show')?.forEach(function (el) {
|
|
el.addEventListener('click', async function (e) {
|
|
e.preventDefault();
|
|
const url = this.getAttribute('data-url');
|
|
let response = await axios.get(url);
|
|
document.querySelector('#live-card-list').innerHTML = response.data;
|
|
document.querySelector('#live-card-modal').style.display = 'block';
|
|
});
|
|
});
|
|
|
|
document.querySelector('#live-card-modal').addEventListener('click',function (e) {
|
|
if (e.target == this){
|
|
document.querySelector('#live-card-modal').style.display = 'none';
|
|
}
|
|
});
|
|
})
|