views:

31

answers:

2

I was wondering if it was possible to make a small script in Jquery that would change an image at a certain time.

For my site, I want the image for the opening and closing of a facility to change when it opens and closes.

Is this possible with Jquery or should I go with something else? Actionscript/Flash? I can't use PHP on the site...

A: 

http://plugins.jquery.com/project/timers

you create function callback that loads a new image from an array of image links

ebt
A: 

You don't even need JQuery, although that has code that will help. You just need to test the Date object and go from there. For example, code like this changes a greeting based on time of day -- no reason why you can't tweak that to do what you need:

Stackoverflow: Setting a greeting based on user's time (Good morning, good afternoon…)

EDIT: I ought to have made it clear that as one might expect, Date works with the date / time on the client machine.

Ben Poole
That seems to be just what I need. Thanks!
danhere