I eliminated "linear" but it didn't make a difference, so I went back to the code as you suggested, shown above. However, there were still some problems...
On some of the page loads, content still faded out, abruptly reappeared, and then faded again before the loading of a new page.
I now went back to the following code and it seems to be working the best:
Code:
(function($){
$('head').append('<style type="text/css">#d1 {visibility: hidden;}</style>');
$(function(){
$('#d1').css({opacity: 0, visibility: 'visible'}).animate({opacity: 1}, 1200, 'linear', function(){
if(typeof fleXenv === 'object' && typeof fleXenv.globalInit === 'function'){
fleXenv.globalInit();
}
if(this.style.getAttribute){
this.style.removeAttribute('filter');
}
});
});
(function(re){
$(document).click(function(e){
var t = e.target;
while (t.tagName && !re[0].test(t.tagName)){
t = t.parentNode || null;
}
if(t && t.tagName && !t.target || re[1].test(t.target)){
e.preventDefault();
$('#d1').animate({opacity: 0}, function(){
location = t.href;
});
}
});
})([/^(a|area)$/i, /^_(top|self|parent)$/]);
})(jQuery);
EDIT:
John, there's a problem on the Friends Page. When you click the link "Click 'n' Say Howdy" at the top of the page, the page scrolls to the message form
anchored at the bottom of the page, and then all the content in that div fades and of course doesn't reappear. If you would please add this additional type
of link clicking to the code, all will then function perfectly.
Also, on the Welcome page, redirection to all referring pages is automatic; there are no mouse clicks to trigger fade out. Can a fade out for this particular
page be added to the page's redirection code below?
Welcome/Splash page
Code:
var SplashSeconds = 6;
// Specify the cookie name. The same name needs to be
// specified in the JavaScript of the splash screen
// page.
var CookieName = "SplashCookie";
// End of customization section. //
///////////////////////////////////
function Redirect() {
var url = '';
if(document.cookie.length > 0) {
// Determine begin position of the cookie with the specified name.
var cname = CookieName + '=';
var begin = document.cookie.indexOf(cname);
var end = 0;
if(begin > -1) {
begin += cname.length;
end = document.cookie.indexOf(";",begin);
if(end < begin) { end = document.cookie.length; }
url = document.cookie.substring(begin,end);
}
}
if(url) { location.href = url; }
}
SplashSeconds = parseFloat(SplashSeconds);
setTimeout("Redirect()",parseInt(SplashSeconds*500));
Thanks,
Kenny
Bookmarks