We have a page where users can link their Facebook account to our site. Since the process can take a while I decided to blur the container div and add a loading icon once the user presses the 'Connect with Facebook' button, using the following bit of Javascript:
$(function() {
$('#linkedin').click(function() {
$('#loading-button').css('display', 'block');
$('.feature-container').css('filter', 'blur(1px)');
});
});
Once the user gets redirected to the next page, and decides to go back to the previous page by pressing the last page button in their browser (meaning that the browser does not make a GET request), the blur and loading icon will still be active.
How can I make it so that the Javascript will not be active, even after the user pressed the last page button in the browser? Is this even possible?