title: Setting cookies on subdomain with jquery
body: <p>The domain of my website which is, let's say, mydomain.com has a subdomain en.mydomain.com</p>
  
  <p>When the user clicks on a link on mydomain.com i need to set a cookie on en.mydomain.com</p>
  
  <p>I tried the following block of code but the cookie is only set on the current domain mydomain.com and not en.mydomain.com</p>
  
  <pre><code>$.cookie("redirectLanguage", "en", { expires: 365,domain: '.mydomain.com'});
  </code></pre>
  
  <p>thanks for your help!</p>