I have a simple script to fade in the homepage of the website, something like:
jQuery(document).ready(function(){
$('body.home').hide();
$('body.home').fadeIn('slow');
});
However, I would like the script to work only one time, once the website loads initially. On subsequent clicks when, say, a user goes to a secondary page and then returns to the homepage, I don't want the homepage to fade in again, it should be just homepage loading without fading.
Is there a way to do it with just jQuery code, maybe somehow execute the function only once and then stop it from executing? Any tips and code snippets will be greatly appreciated!