title: Calling a Jquery function after the pages is loaded
body: <p>I have got a link with the click event in my JQuery, something like below:</p>
  
  <pre><code>$('#TopLoginLink').click(function()
  {
  //Here I want the current page should be reloaded with "https" and after the page is loaded then it will automatically call my function MyDialogPopup(). Something like below:
  var myCurrentPage = window.location.href.replace('#','');
                  var reloadURL;
  
                  if (https!=' ')
                  {
                      reloadURL = myCurrentPage.replace('#','').replace("http",https);
                      window.location.href = reloadURL;
                      MyDialogPopup();
  
                  }  
  
  });
  </code></pre>
  
  <p>The above code is reloading my page perfectly, however my problem is that my function is also called immediatley, but I want my function should be called only when my page is loaded with "https" completely.</p>
  
  <p>Please suggest! how can I achieve this</p>