I'm using jQuery to perform some ajax when a link with a certain id is clicked on. The ajax updates a database record and then it replaces the 'a' tag with a new one. This all works fine. The new 'a' tag has the same id as the old one, but text and some other properties on it change. It's the id that activates the jQuery functionality.
When the old 'a' tag is replaced with the new one the jQuery that should operate doesn't work. I understand that this is because the new 'a' tag has been added after the page loaded so jQuery doesn't know to fire when it's clicked on. Is there anything I can do that will force jQuery to fire when the new 'a' tag is clicked? I suspect this has probably been answered a million times, but I don't just can't find the right search terms.