sifatbaho
This commit is contained in:
28
resources/js/pages/project-list.init.js
vendored
Executable file
28
resources/js/pages/project-list.init.js
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Template Name: Velzon - Admin & Dashboard Template
|
||||
Author: Themesbrand
|
||||
Website: https://Themesbrand.com/
|
||||
Contact: Themesbrand@gmail.com
|
||||
File: Project list init js
|
||||
*/
|
||||
|
||||
// favourite btn
|
||||
var favouriteBtn = document.querySelectorAll(".favourite-btn");
|
||||
if (favouriteBtn) {
|
||||
Array.from(document.querySelectorAll(".favourite-btn")).forEach(function (item) {
|
||||
item.addEventListener("click", function (event) {
|
||||
this.classList.toggle("active");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Remove product from cart
|
||||
var removeProduct = document.getElementById('removeProjectModal')
|
||||
if (removeProduct) {
|
||||
removeProduct.addEventListener('show.bs.modal', function (e) {
|
||||
document.getElementById('remove-project').addEventListener('click', function (event) {
|
||||
e.relatedTarget.closest('.project-card').remove();
|
||||
document.getElementById("close-modal").click();
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user