Category "callback"

Getting a callback function to trigger after clicking on an alert with JQuery

I have a callback function which redirects the user and I want to have it trigger after clicking "OK" on an alert window. Right now, the code looks like this:

My event handler is executed before the event is fired, why?

I have a pop up window with a button. When I click the button I want something to happen, say an alert. The issue I am having is that the onclick event fires as