Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show ad for 5 sec then show content

 
Alexander Petru
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay first of all i want to tell you that i am a real noob at javascript and i have bad english too so, sorry!.
I want to make with javascript a div with an ad that will show for 5 seconds and then to be replaced (actually hide the ad and show de content) by the content.
I tried to do something on my own but i haven`t been successful here is the code:

Please don`t laugh . I am opened to suggestions if anyone can tell me an other way to do this.Thank you in advance.
[ August 27, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64828
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really code without indentation?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64828
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
without looking at your code (too hard without indentation), here's how I would probably go about it:Note that the script is kept to a minimum by using CSS to control the styling.
 
Alexander Petru
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about my code .
And thanks Bear Bibeault I will try your code asap.
I still have lots to learn I hope this forum will help me
[ August 28, 2008: Message edited by: Alexander Petru ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic