Refreshing a function/.click event

Refreshing a function/.click event

On page load I have this
$('.deletevar').click(function(){ ...some code... });

Now this function uses ajax to reload the html for $('.deletevar') rendering the function I had originally set useless, unless I run $('.deletevar').click(function(){ ...some code... }); after the ajax call.

Is there a easier way to do this? As currently if I want to make changes to this function I have to edit it in 2 places.

Just need a way of keeping one copy of the function and refreshing it after the ajax call.