NewSignature / us-map

An interactive map of the United States using Raphaël
BSD 2-Clause "Simplified" License
280 stars 184 forks source link

Trigger state color after form submit #51

Open garymn opened 9 years ago

garymn commented 9 years ago

When a state is clicked it turns green and a form appears with PHP validation. After submitting, if there are errors, it will return to the same page and display the errors. The problem is the state selected is black not green - meaning it returns back to the default color. How can I submit the form, if it returns to the page, how can I keep the state clicked as green?

I've tried combining php and jquery using if and else statements, jquery load and click, but have not been successful. Can someone explain how this can be done?