Answers.Body: <p>So in my particular case, the issue was caused by the WordPress theme I was using called Divi.</p>
  <p>There is setting in the Divi theme options (Divi &gt; Theme Options &gt; General &gt; Performance) called <code>Defer jQuery And jQuery Migrate</code> which needed to be <code>DISABLED</code> and then everything started working fine.</p>
  <p><a href="https://divibooster.com/disable-jquery-deferral-in-divi/" rel="nofollow noreferrer">https://divibooster.com/disable-jquery-deferral-in-divi/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-30T02:15:24.850Z
Answers.LastActivityDate: 2022-07-30T02:15:24.850Z
Answers.UserDisplayName: jsherk
Body: <p>I have created a profile with both Country dropdown and State dropdown on it.</p>
  <p>When I Preview the profile, the State selections correctly change when I change the country.</p>
  <p><a href="https://mydomain.com/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fadmin%2Fuf%2Fgroup&amp;action=preview&amp;id=15&amp;field=0&amp;context=group" rel="nofollow noreferrer">https://mydomain.com/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fadmin%2Fuf%2Fgroup&amp;action=preview&amp;id=15&amp;field=0&amp;context=group</a></p>
  <p>However when I go to the live profile page (even when logged in Admin) the State dropdown does not change. For example changing from United States to Canada, will leave all the US states in the dropdown.</p>
  <p><a href="https://mydomain.com/civicrm/profile/create?gid=15&amp;reset=1" rel="nofollow noreferrer">https://mydomain.com/civicrm/profile/create?gid=15&amp;reset=1</a></p>
  <p>Checking the developer console, I see a bunch of jquery errors showing up, such as this:</p>
  <p><a href="https://i.sstatic.net/ZuraF.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZuraF.jpg" alt="enter image description here" /></a></p>
  <p>Using WordPress v6.0.1 and CiviCRM v5.50.3</p>
  
Tags: <wordpress><webform-civicrm><profile><forms>
Title: Jquery JavaScript error for State/Province selection not changing when Country changed
ThreadText: # Jquery JavaScript error for State/Province selection not changing when Country changed
  
  (Asked by: username_0 on 2022-07-24)
  
  I have created a profile with both Country dropdown and State dropdown on it.
  
  When I Preview the profile, the State selections correctly change when I change the country.
  
  <https://mydomain.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fuf%2Fgroup&action=preview&id=15&field=0&context=group>
  
  However when I go to the live profile page (even when logged in Admin) the State dropdown does not change. For example changing from United States to Canada, will leave all the US states in the dropdown.
  
  <https://mydomain.com/civicrm/profile/create?gid=15&reset=1>
  
  Checking the developer console, I see a bunch of jquery errors showing up, such as this:
  
  [![enter image description here](https://i.sstatic.net/ZuraF.jpg)](https://i.sstatic.net/ZuraF.jpg)
  
  Using WordPress v6.0.1 and CiviCRM v5.50.3
  
  **Tags:** wordpress, webform-civicrm, profile, forms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-07-30. Score: 0 | Accepted answer
  
  So in my particular case, the issue was caused by the WordPress theme I was using called Divi.
  
  There is setting in the Divi theme options (Divi > Theme Options > General > Performance) called `Defer jQuery And jQuery Migrate` which needed to be `DISABLED` and then everything started working fine.
  
  <https://divibooster.com/disable-jquery-deferral-in-divi/>
  
  
  ---
  
  