Strange jquery vs js isssue

Hai folks,

sorry folks, question delted. little messed up :slight_smile:

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

var nation;
  nation = ""// your code...
  //maybe call some function that does something with nation

Thanks buddy!!!
yes, undestood.