ok ^AndreA^, i think i got it. I think the markup for the login div is loaded on page load, while the logout button markup is fetched via your ajax call to "sign_in.php", right?
In such case the issue you are facing is normal, and quite usual: the event binding is set on page load. Since your logout link markup does not exist yet, the event is not binded, whereas your div markup is available on document ready, so its event does work. the best solution is to use the livequery plugin, which allows to bind events even to markup that is not available at the document.ready time. Its a really useful plugin , since you do your application using ajax, i can only strongly recommend you to use it. after you will have added the link to the plugin in your page header you can simply use it like this: instead of: $('#log_out_link').bind('click',function(){]) you go: $('#log_out_link').livequery('click',function(){]) hope this helps, alexandre