I'm trying to create an interface were if user goes to dashboard they are prompted with a log in screen, once logged in they are taken to there profile page. I have an animation that triggers a welcome box to pop down in the top right hand corner using jquery.
my theory is they can only be taken to the profile if logged in, and in php i have it so unless session is running the welcome box won't be displayed so once logged in and session is running and there redirected to profile.php and documents ready make welcome box bounce in down using animate.css then an if statement to say hey if has class inview dont run the animation. but if i use
.removeClass("animated bounceInDown")
so the animation can't be ran again on refresh or page load or if they go to another page like blog etc it'll remove it before the animation can happen and then no point delaying it cause the animation will run. i can't seem to figure out a way to write this and i don't know indepth jquery or ajax.
$(document).ready( function () {
$(".user").addClass("inview animated bounceInDown");
callmeman();
});
function callmeman(){
if ($('.user').hasClass('inview')) {
// dont run animation again
}else {
// do nothing
}
}
i'm sorry if i haven't explained this well as it's my first post on here. THANKS IN ADVANCE!