In my site i have a welcome animation (created with jquery) which runs when any one opens my website (http://www.mysite.com). Then the same user going to anther page in my site for example http://www.mysite.com/about then click back to home (http://www.mysite.com) the animation again shows up. How can i restrict this ?
Share some logic like putting a session or settimeout or something like that.
This is how you could do it using jquery cookie plugin:
http://jsfiddle.net/lollero/2nYBV/ ( or http://jsfiddle.net/lollero/2nYBV/show/ )
You might want to change the way cookie expires. That info can be found in the plugin page. The way I did it, it expires after every browser session.
jQuery:
You could just as easily reverse this to hide, if the cookie is set. 1. Set cookie 2. if statement to trigger hide, if cookie is set.
CSS:
HTML: