Created
March 12, 2014 00:09
-
-
Save dwillis/9497838 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| $('#filterVoteStates').change(function () { | |
| on_state = $(this).val() | |
| on_party = $('#filterVoteParties').val() | |
| if((on_state == 'all') && (on_party == 'A')){ | |
| $('table.roll-call-table tbody tr').show() | |
| } else if((on_state != 'all') && (on_party == 'A')){ | |
| $('table.roll-call-table tbody tr[rel='+on_state+']').show() | |
| $('table.roll-call-table tbody tr[rel!='+on_state+']').hide() | |
| } else { | |
| $('table.roll-call-table tbody tr').hide() | |
| $('table.roll-call-table tbody tr.'+on_party+'[rel='+on_state+']').show() | |
| } | |
| }); | |
| $('#filterVoteParties').change(function () { | |
| on_state = $('#filterVoteStates').val() | |
| on_party = $(this).val() | |
| if((on_party == 'A') && (on_state == 'all')){ | |
| $('table.roll-call-table tbody tr').show() | |
| } else if((on_party == 'A')){ | |
| $('table.roll-call-table tbody tr[rel='+on_state+']').show() | |
| $('table.roll-call-table tbody tr[rel!='+on_state+']').hide() | |
| } else if (on_state != 'all'){ | |
| $('table.roll-call-table tbody tr').hide() | |
| $('table.roll-call-table tbody tr.'+on_party+'[rel='+on_state+']').show() | |
| } else { | |
| $('table.roll-call-table tbody tr').hide() | |
| $('table.roll-call-table tbody tr.'+on_party).show() | |
| } | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment