Say I have a set-up like this:
$('#mylink').click(function(event){
savePost();
});
<a id="mylink" href="http://google.com">my link</a>
If I click the link will I be gone to a different page without giving the function a chance to execute?
What if savePost() has ajax and a callback function? Will it execute regardless of what page the browser is on when the script executes? (or would I have to preventDefault on the link and put the window.location command within the callback)