As I work on developing a website, I am utilizing the Pjax library, which is a port of jquery pjax. However, I have encountered an issue where touch events are not being processed. My implementation of Pjax looks like this:
var pjax = new Pjax({ selectors: ["head title", "body"] })
In addition to that, I have incorporated some animations into the site as well:
document.addEventListener('pjax:send', function(){
var $main = document.querySelector('main')
$main.style.opacity = 0
})
document.addEventListener('pjax:complete', function(){
var $main = document.querySelector('main')
$main.style.visibility = 'hidden'
$main.style.opacity = 0
setTimeout(function(){
document.querySelector('main').style.visibility = 'visible'
document.querySelector('main').style.opacity = 1
attach_menu_control()
}, 10)
})
It's crucial for me to ensure that everything works smoothly on mobile devices. You can visit the site at www.saulesinterjerai.lt (although it can be buggy).