2 options you have here in order to achieve what you need
1- QueryString
you can use a querystring to determine if this load is from your link or a normal one
something like this:
$(function(){
$('#redirect').click(function(){
window.location = 'YOUR_HOME_DOCUMENT?lnk=1';
});
});
then inside your homepage ready() function, check for the existence of this querystring, if provided, then animate whatever you want.
Example:
1- first, in order to read Querystring variables with ease, I always use the following jQuery plugins. (I can't remember from where I've got this code, but many thanks for the original poster).
$.extend({
getUrlVars: function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
},
getUrlVar: function (name) {
if ($.getUrlVars()[name] == null) {
return "";
}
else {
return $.getUrlVars()[name];
}
}
});
then, I can do something like this:
$(function (){ // a short hand for $(document).ready(function) ;)
var comingFromMyLink = $.getUrlVar('lnk');
if(comingFromMyLink)
{
// do the required animation here
}
});
2- Cookies
I really don't recommend this option for this scenario, but to be honest, I wanted to provide you with much information as possible, and you may choose whatever you find suitable.
You can preserve a flag or a variable in a cookie, and try to get it inside your homepage
checkout this sample: http://jquery-howto.blogspot.com/2010/09/jquery-cookies-getsetdelete-plugin.html
or this plugin: http://archive.plugins.jquery.com/project/Cookie
that's it, please let me know if you still need help in this manner, hope you find my answer useful for you :)