jQuery Find-Your-Rep

A basic jQuery plugin for finding out who represents you in federal and state legislatures

View the Project on GitHub sunlightlabs/jquery-findyourrep

Find Your Rep Widget

A Basic jQuery plugin that renders a form into the specified target, geocoding input and displaying results from Sunlight's Congress and Open States APIs.

Example

Usage:

  1. Link jQuery and dist/jquery.findyourrep-pack.min.js on your page (in that order).
  2. Call findYourRep() on an element:
    $('.myDiv').findYourRep({
        apikey: 'your-key'
    });

Options:

Passed as a javascript object to the constructor, just like any jQ plugin.

Default Styles:

There's an included stylesheet which you can add to your page to add some basic style.

By default, all CSS is scoped to a container classname, .fyr-container. There's a scss source file available in the src/css folder which you can edit to add your own style.

Screenshots:

Enter your address screen

Result Screen

Contributing:

  1. Fork this repo
  2. Install Node.js if you don't have it
  3. Run npm install && bower install && grunt demo
  4. Commit your changes and send a pull request

License:

BSD3