Phillip Senn
Phillip Senn

Reputation: 47625

How to make a sign light up

Apologies if this doesn't qualify as a StackOverflow question.

I have a jpg of a sign that's made up of 100 light bulbs. I'd like to use jQuery to animate the bulbs so that they flicker on after a moment's hesitation.

I'm thinking that it would require two images and that I would animate hiding/showing them back and forth to produce the flicker, but I wanted to ask if there was a more elegant solution first.

Upvotes: 3

Views: 257

Answers (3)

PHLAK
PHLAK

Reputation: 22527

Create a .gif that cycles back and forth.

Upvotes: 2

John Fisher
John Fisher

Reputation: 22717

If you made the lights in the image transparent (with alpha-blending, you could keep the reflective parts of the light so it looks right).

Then, you could place the image on a properly sized div, and set the background color of that div to whatever you like -- it will become the color of the lights.

(I've never done this, but it sure doesn't seem like you'd hit anything that should prevent you from doing it.)

Upvotes: 1

n8wrl
n8wrl

Reputation: 19765

Seems like you could do something with an overlaying-div with opacity that you vary to 'flicker' the lights. Position the div so it is 'on top of' the lights. Then, hide it to be 'on'.

Upvotes: 1

Related Questions