I'm using ajaxComplete to catch AJAX requests, the only problem is that I can't catch the /cart.js because there's always a random Query String.
ex- '/cart.js?_=1324346569'
How can I tell ajaxComplete to ignore query strings so my code picks up on just '/cart.js'?
My code is the following -
$(document).ajaxComplete(function(event, xhr, settings) {
if (settings.url === "/cart.js") {
console.log('caught cart.js even tho it has these query parameters');
}
});
Thanks!