title: Jquery load remote page element according to a string in current page url
body: <p>I'm new in Jquery, I would like to have Jquery code to get the current page url and if the url contains certain string then load remote element.</p>
  
  <p>example:</p>
  
  <p>i have the page urls like this:</p>
  
  <pre><code>"http://......./Country/AU/result-search-to-buy"
  "http://......./Country/CA/result-search-to-buy"
  "http://......./Country/UK/result-search-to-buy"
  </code></pre>
  
  <p>the part "/Country/AU" is what I need to determine which page element I should load in, then if "AU" I load from "/state-loader.html .state-AU", if "CA" I load from "/state-loader.html .state-CA"</p>
  
  <p>I have a builtin module "<strong>{module_pageaddress}</strong>" to get the value of the current page url, I just dont know the Jquery logic to let it work. </p>
  
  <p>I expect something like this:</p>
  
  <pre><code>if {module_pageaddress} contains "/Country/AU/" 
  $('#MyDiv').load('state-loader.html .state-AU');
  
  if {module_pageaddress} contains "/Country/CA/" 
  $('#MyDiv').load('state-loader.html .state-CA');
  </code></pre>
  
  <p>please help and many thanks.</p>