title: Execute jquery after page load
body: <p>I am facing the following problem:</p>
  <p>On a webpage <a href="https://i.stack.imgur.com/watYo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/watYo.jpg" alt=" page1" /></a> I have to click on a link.The second page opens on the same container (the link does not change plz check the photos)<a href="https://i.stack.imgur.com/ZdAy8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZdAy8.jpg" alt="page2" /></a>.</p>
  <p>On the second page I have to execute some jquery. I am trying the following code:</p>
  <pre><code>`   $(document).ready(function(){
     $(&quot;a&quot;).click(function(event){
       alert(&quot;Thanks for visiting!&quot;);
          var vr1= document.getElementsByClassName(&quot;hc-inline-block hc-px1 hc-rounded hc-white&quot;)[0].innerText;
          alert(&quot;vr1 is: &quot; + vr1);
  
      });
  
   });`
  </code></pre>
  <p>The problem of this code is that it gets executed after the link is clicked but before the second page is loaded. This makes the class unavaiable...</p>
  <p>Is there anyway I can execute some Jquery after the second page is fully loaded???</p>