Project of The Sunlight Foundation    
About PopUp Politicians

Why Use Sunlight Popup Politicians?

Tags and the Web

Sunlight links are based on tags, and they're an attempt to get more people to start tagging their own content. When people add tags to the web, they make it easier to use, more searchable, and make it possible for people to connect content all over the world.

By making tags "pop" with popup windows, we hope to encourage more people to start tagging content when they write blog posts and web pages. If we can encourage more people to use tags, with or without sunlight links, then the web as a whole will be better.

How to Add Sunlight Links to Your Blog or Website

Step 1: Add the Script Link to Your Page

Sunlight links is a service that runs over the web. To use it, you need to include our script file in the <head/> section of your website like this:

<script src='http://www.sunlightlabs.com/popuppoliticians/sunlightpopups.js'></script>

(That's it for installation).

Step 2: Add some Tags

To add a popup, you need to create a tag in the content of your site. A tag is basically a link that describes some content. The tag contains the name of the person you're describing, and that's what we use to place the popup on the page.

A tag looks like this:

<a rel='tag' href='http://sunlightlabs.com/tag/Rep.+Nancy+Pelosi'>Nancy Pelosi</a>

If you don't have the script included in your page (see above), this will look like a regular link. If you do have the script included, then the link will be replaced with a popup.

Example:

Tips

When creating tags, the link (the href part) should contain the complete name of the person you're talking about. The text of the link (the part in between the <a></a> tags) can contain anything you like. Also note that I've replaced spaces in the name with plus (+) signs; this is a good idea, but it's not strictly necessary.