} catch (e) { console.log(e); } window.HideLoading(); }); document.addEventListener('pjax:error', function (e) { window.HideLoading(); window.location.href = e.triggerElement.href; });