Passing execution from one click event in js file to another function in another js file
<p>I have a click event A in which when triggered, it will check if the user is logged in. If the user is not logged in, the modal login window will be triggered and the user logs in. When user clicks on login button, the logging in is performed and the execution is passed back to click event A and continue execution. </p>

<pre><code>$('.A').on('click',function(){
   //Check if logged in
   if(!logged_in())
   {
      var r = confirm("you are not logged in. Do you want to login/register"?);
      if(r)
           $('#login_link').click();
      else return
   }   

   //Continue execution if logged in
   //Execution of code
});
</code></pre>

<p>My #login_link is the modal window for log in. The jquery when user clicks on log in button on the modal window</p>

<pre><code>$('#sign_in').click(function(){
 //perform log in function
 if(success)
     window.location.assign(window.location.href);
});
</code></pre>

<p>when user logs in successfully, it will remains on the page it is at. But now after logged in, I want the execution to return to the click event on A. These two events are in different js files but the page is referencing to both of them. Anyone can help me on this?Thanks in advance!</p>
