Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PLEASE HELP: I need divs to slide on first load

Featured Replies

Hi,

 

I'm new to this website.. I'm creating a website for a client and need an animation to make it look like the website is "opening" (like a shutter) on first load. Preferably so it happens every 2 hours (i.e. if the user goes away and comes back.. it'll happen again).

 

Anybody got any ideas on how I can do this? Really appreciate it!

 

Cheers,

Tom

  • Author

Just to mention: I'm creating the website on Joomla and have already got a working website without this effect (but the effect was part of the quote that I made).

 

Cheers,

Tom

Just make a cookie , which expires after two hours,

if the cookie isn't set show the effect and set the cookie.

 

Léon

  • Author

Yeah, I thought as much. Thank you.

 

Do you have any example code, know where I can put it, and what method I should use for the animation? I don't want to use flash.

 

I've never done this "first time cookie" thing before, sorry.

 

Cheers,

Tom

Yeah, I thought as much. Thank you.

 

Do you have any example code, know where I can put it, and what method I should use for the animation? I don't want to use flash.

 

I've never done this "first time cookie" thing before, sorry.

 

Cheers,

Tom

 

Making a cookie isn't that hard with Javascript this should get you started.

 

If you are familiar with Javascript the shutter effect will not be a problem,

if you aren't you might want to take a look at jQuery.

It's a framework with nice methods like ".animate()" which will make it easier for you to create the effect.

 

Hope it helps,

Léon

  • Author

You're a legend Léon! My problem is, this all seems too much to do before tomorrow.

 

How open are you to writing script that says "if cookie does not exist, play animation" and telling me where to put it, and also telling me the Java for two black divs opening from the center upwards and downwards? I'll keep your email for future work and may have some paid work for you at sometime soon.

 

Cheers Léon

You're a legend Léon! My problem is, this all seems too much to do before tomorrow.

 

How open are you to writing script that says "if cookie does not exist, play animation" and telling me where to put it, and also telling me the Java for two black divs opening from the center upwards and downwards? I'll keep your email for future work and may have some paid work for you at sometime soon.

 

Cheers Léon

 

Well, I never worked with Java before ... ( Or do you mean Java as shorthand for Javascript ? )

But I maked a little demo in Javascript , tell me if this is what you're searching for, if it is, you can check out the source code.

And you can always email me if you have some work for me :)

 

Léon

Edited by Leonvv

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.