Solved

*Animate* Scroll Up on Timed Hide Function

Posted on 2004-09-03
5
285 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

785 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