Get a light switch for your website

Help us to encourage more people to sign up to Earth Hour!

It’s easy to add this clever pull-cord light switch to your own web site. It will appear in the top right-hand corner of your chosen page(s), where it will sway gently.

Visitors to your site can ‘pull the switch’ by clicking on it and can then sign themselves up to Earth Hour. Don’t worry, your visitors won’t be taken away from your website and they can remove the pull cord if they like.

Want to see what it looks like? We’ve got it on this page! (See top right).

How do I add the switch to my website?

Simply paste this code just below where it says <body> on the code of your web page:

 

  • Close the Loop

    When I add the html above, it is showing up behind my website pictures, it there a way to fix that?

  • Paul Roberts, WWF-UK

    Hi, this sounds like it might be a z-index issue. At the following link I have put some code that might help, if you cut and paste it into the page directly after the lightswitch code above.

    http://pastebin.com/g7UpPuN2

    You might need to increase the number 1999 to something higher if it is still behind your pictures (basically it depends on what z-index is currently assigned to your pictures). The signup lightbox itself defaults to a z-index of 2000 mind, so you might end up with the lightswitch in front of the signup form if you increase it higher than that (in which case you can apply the same trick to the div for the signup form).

  • Matt

    Can you set the Z-index on the modal form as well please? http://www.fiz.com

  • matt

    Hi. Thanks for that, it’s working fine in Chrome but I’m not seeing the animation at all in FF and IE…

  • Cemanthe Harries

    Would be great if you could make this less complicated next year and possibly develop a plugin or html for a widget for wordpress? Or did I miss something?

    • http://wwf.org.uk/ Claire at WWF

      Hi Cemanthe – thanks for the suggestion. We’ll try to make it simpler next year! Thanks for supporting Earth Hour.