afridy — 2012-10-20T07:54:56-04:00 — #1
sorry folks, question delted. little messed up
aussiejohn — 2012-10-20T08:04:42-04:00 — #2
Well, what happens is that jQuery binds the click event handler and then your script continues executing. The bit inside of the event handler will only be executed when somebody clicks on one of the given elements. If you want to set the "nation" variable based on what someone selects, the solution is simple, just move the assignment into the event handler.
e.g. something along these lines
nation = ""// your code...
//maybe call some function that does something with nation
afridy — 2012-10-20T08:07:06-04:00 — #3