Hi,
I'm using Purity III version 2.02 and after upgrading to Joomla 4 I noticed some errors in my browser's JS console.
Seems as if the JQuery API for reacting to window events has changed.
The fix is simple, see below.
Code as shipped:
$(window).load(function(){
// hide button to top if the document height not greater than window height*2;using window load for more accurate calculate.
if ((parseInt($(window).height())*2)>(parseInt($(document).height()))) {
$('#back-to-top').hide();
}
});
Fixed:
$(window).on('load', function(){
// hide button to top if the document height not greater than window height*2;using window load for more accurate calculate.
if ((parseInt($(window).height())*2)>(parseInt($(document).height()))) {
$('#back-to-top').hide();
}
});
Would have loved to file a PR on GitHub (etc.) but the code does not seem to be versioned there...