On a dynamically loaded page via pjax (except in IE), there are several links at the bottom.
Whenever one of these hyperlinks is clicked, the page scrolls to the top while still loading.
Although I am okay with this behavior, I'm curious if it's possible to add some opacity to the page while it's still loading. Please note that I'm unsure about finding a solution that would be compatible across both pjax and non-pjax browsers.
$(document).on('click', 'my-link a', function() {
$('html, body').animate({ scrollTop: 0 }, 'fast');
})
;