title: auto click button after window.location.href
body: <p>I have an onclick event on my <code>anchor tag</code> that redirects the user to a specific page and auto clicks on a link after the loading of the page.</p>
  
  <p>this is what i have right now:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var experience_modal = "#experienceModal";
  
      function experienceModal() {
  
          window.location.href = "/Resume";
          $(experience_modal).trigger('click');
  
      };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p style="margin-bottom: 10px;"&gt;&lt;strong&gt;&lt;a href="javascript:void(0);" onclick="experienceModal()"&gt;Add&lt;/a&gt; an Experience&lt;/strong&gt;&lt;/p&gt;
  
  
  
      </code></pre>
  </div>
  </div>
  </p>
  
  <p>I am encountering a problem that the trigger property does not work after the redirecting to the specific page.</p>
  
  <p>please guide me on how to fix this problem.</p>
  
  <p>thank you in advanced!</p>