Solved

*Animate* Scroll Up on Timed Hide Function

Posted on 2004-09-03
5
280 Views
Last Modified: 2013-11-19
Script and example link will be shown in next post...

I have already have a timed hide function(currently it is set at after 7 seconds - it hides anything btwn the div)... all i need is to Animate the hide function.. I don't think it's possible to animate hide function in Netscape - so for netscrap - dissappear is fine.

requirements:
1. must animate scroll up hide function (just like for first time visitors on www.mtv.com on their home page - their banner scrolls up and hides after about 7 seconds)
2. must dissappear in netscape
0
Comment
Question by:andreni78
  • 3
5 Comments
 

Author Comment

by:andreni78
ID: 11976586
Here's the timed hide script:

<div id="myBanner">
hello!
<br>
Hi!
<br>
animate!
</div>

<script type="text/javascript"><!--
// hides anything btwn divs after a set period of time
var iNbSecondsBeforeHiding = 7;
var iNbHoursToHide = 24;
if (("&"+document.cookie).indexOf("&hidebanner=1") != -1)
  f_hideBanner();
else {
  setTimeout("f_hideBanner();",iNbSecondsBeforeHiding*1000)
  document.cookie = "hidebanner=1;expires="+(new Date((new Date()).getTime()+iNbHoursToHide*60*60*1000)).toGMTString();
}
function f_hideBanner() {
  if (document.getElementById)
    document.getElementById("myBanner").style.display = "none";
  else if (document.all)
    document.all["myBanner"].style.display = "none";
}
//--></script>
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 total points
ID: 11976828
Hi

Sorry about the missed reply on your last question. Well, for mtv, are you talking about the thing where the second image is of Bush? That's done using Flash and it's rarely effective to attempt to get the same level of smoothness with Javascript. For my script on the other question, try removing the style.display='none' part and see if that helps.

Regards,
Zyloch
0
 
LVL 2

Expert Comment

by:cheyennejk
ID: 11977110
This site has all the latest code for what you are trying to do :

http://www.codelifter.com
0
 

Author Comment

by:andreni78
ID: 11977365
there's a 728x90 banner on mtv.com only if u're a first time visitor.. you'd have to clear your cookies if you want to see the banner again.. it animates up after about 7 seconds as you can see.. that's all i'm looking for.. the hide animation script is available on this link http://majestic.gotdns.com/methoda.htm - if you choose option D and then choose somethign else - you'll see the hide animation.. this also works on netscape but it doesn't animate on NS...
0
 

Author Comment

by:andreni78
ID: 11977366
that link is mine btw so feel free to use the functions on there =)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now