To bind events, such as 'click', to elements that are added to the page dynamically, as with AJAX, you can use a plugin like livequery. You can read some more here http://docs.jquery.com/Plugins/livequery and get the plugin.
- [jQuery] Dynamic img not getting events Jose Hidalgo
- [jQuery] Re: Dynamic img not getting events JT