Scripts of “.oceanwp-grid-list” buttons get stripped after AJAX load
-
Hi,
I use the plugin “Filter Everything” for filtering products on product archive page for the id “#primary”, which works perfectly. The only problem I have is, that after successful AJAX loading, the buttons for list and grid view “#oceanwp-list” and “#oceanwp-grid” get stripped from their functions. This only happens for the mentioned. Do you have a solution, that the functions will stay / will be reapplied after AJAX success?
These 3 functions get stripped for both buttons (here I show only the three for list button):
function() { setTimeout(function() { alignProductCards(); }, 500); }
function(e) { e.preventDefault(), e.stopPropagation(), (0, n.default)(t, f).grid.classList.remove("active"), (0, n.default)(t, f).list.classList.add("active"), s.default.set("gridcookie", "list", { path: "" }), (0, n.default)(t, f).allProducts.forEach(function(e) { (0, u.fadeOut)(e, { callback: function() { e.classList.add("list"), e.classList.remove("grid"), (0, u.fadeIn)(e) } }) }), setTimeout(function() { (0, n.default)(t, m).call(t) }, 301) }
function(e) { return "undefined" != typeof ce && ce.event.triggered !== e.type ? ce.event.dispatch.apply(t, arguments) : void 0 }
Would be nice if this would stay, as the buttons get stripped completly from their functionality. I assume that this will also happen then with other plugins or functions that would refresh the product archive page via AJAX.
Thanks and regards
- The topic ‘Scripts of “.oceanwp-grid-list” buttons get stripped after AJAX load’ is closed to new replies.