Replace:
Code:
<script src="scripts/opacityFade.js" type="text/javascript"></script>
<script>window.onload = opacity('d1', -130, 100, 440)</script>
with:
Code:
<script src="scripts/jqOpacityFade.js" type="text/javascript"></script>
in scripts/jqOpacityFade.js put (for onload):
Code:
(function($){
$('head').append('<style type="text/css">#d1 {visibility: hidden;}</style>');
$(window).bind('load', function(){
$('#d1').css({opacity: 0, visibility: 'visible'}).animate({opacity: 1}, 700, 'linear', function(){
if(this.style.getAttribute){
this.style.removeAttribute('filter');
}
});
});
})(jQuery);
Or put (for document ready, happens sooner, but is perhaps less dramatic):
Code:
(function($){
$('head').append('<style type="text/css">#d1 {visibility: hidden;}</style>');
$(function(){
$('#d1').css({opacity: 0, visibility: 'visible'}).animate({opacity: 1}, 700, 'linear', function(){
if(this.style.getAttribute){
this.style.removeAttribute('filter');
}
});
});
})(jQuery);
Change:
Code:
<div style="margin-left:44px; margin-top:40px; margin-bottom: 22px; height:260px; width:713px; filter:alpha(opacity=0); -moz-opacity:0; opacity:0; overflow:hidden;" id="d1">
to:
Code:
<div style="margin-left:44px; margin-top:40px; margin-bottom: 22px; height:260px; width:713px; overflow:hidden;" id="d1">
Those styles can go in the stylesheet.
This not only enables this via jQuery, but also allows the content to be seen in non-javascript browsers.
To that end, make the menu functional in those browsers by adding the highlighted as shown:
Code:
. . . ground-color:transparent;
border:none;
cursor: pointer;
}
.theTicker {
font-size:16px; color:white; font-weight:normal;
}
.jqImgFader {
width: 164px;
height: 38px;
}
.jqImgFader a {
width: 164px;
height: 38px;
display: block;
}
.jqImgFader img {
visibility: hidden;
}
-->
</style>
In an unrelated matter, get rid of:
Code:
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
You're not using it and it throws a non-fatal error.
Bookmarks