Skip to main content

TV switch on/off effect using JavaScript

The script.aculo.us JavaScript library has an effect called “Effect.SwitchOff” that can be used to hide elements on a page accompanied by an effect similar to the shutdown of old cathode ray tube televisions. You can try out the demo here. As you can see, the effect though a clever one is not very convincing.

MatrixTeo.net has created an enhanced version of Effect.SwitchOff. He used Effect.SwitchOff coupled with some additional JavaScripts and CSS, and created a very realistic TV switch off effect.

He used two DIVs – one DIV carries the image or the movie as we will call it, and the other is a container that represents the TV. The TV frame is a GIF image with a transparent area to show the movie through. The second DIV is positioned on top of the first DIV using the z-index property. Two functions, one to turn on the TV with a fade and one to power it off are added to control the TV. See the result below.

It’s in Spanish Italian. “Spegni la tv!”  is Turn OFF and “Accendi” is Turn ON.

The script is available for download. It can be used in blogs and websites to add a nice touch to animated GIFs or even static images.

Comments

  1. I'm not 100% sure (i'm french) but i'm pretty sure it's italian not spanish...

    ReplyDelete
  2. Hmm... I don't know why I thought it's Spanish, but you are right, it's Italian.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: