Boost Your Wishlist Items With jQuery Document Functions
function deferWlLoaded(callback) {
if (window.vertexWLLoaded && window.jQuery) {
setTimeout(function () {
callback(); }, 10); } else {
setTimeout(function () {
deferWlLoaded(callback); }, 50); function showVertexWishlist() {
VertexWLUtils.generateWishlistPopupContent(null, null).then(html => {
jQuery("#vertex_wl_page").html(html)
}); // Remove Item from Wishlist
jQuery(document).on('click', '.wishlist-item-remove', function () {
var product_id = jQuery(this).data('product-id'); var variant_id = jQuery(this).data('variant-id'); VertexWLUtils.handleWLAction(product_id, variant_id, true, null, null); VertexWLUtils.generateWishlistPopupContent(null, null).then(html => {
jQuery("#vertex_wl_page").html(html); }); }); // Filter Wishlist Items
jQuery(document).on('click', '.vertex-search-button', function () {
const inputValue = jQuery("#vertex-filter-input").val(); VertexWLUtils.generateWishlistPopupContent(null, inputValue).then(html => {
jQuery("#vertex_wl_page").html(html); }); }); // Reset Wishlist Items
jQuery(document).on('click', '.vertex-reset-button', function () {
VertexWLUtils.generateWishlistPopupContent(null, null).then(html => {
jQuery("#vertex_wl_page").html(html); }); });