I'm developping a website for handheld devices (smartphones and tablets), and I have a JQuery animation. I needed to reload the JS if the device change orientation so I found and used :
$( window ).resize(function() {
window.location.reload();
});
But the pages reload on page scroll without changing orientation, same in Chrome with developer tools without changing size.
Is there a solution or a way to reload the JS without window.location.reload();
?