Re-creating jquery-ui elements after xhr update

Re-creating jquery-ui elements after xhr update

Hi all,
I have a function (createButtons()) which executes on document.ready, which selects button elements and creates a jquery UI button, and attaches an event handler for the click event.
This all works until I update the part of the page via an ajax call. The buttons returned in that aren't being detected by the original createButtons() function.

Adding a call to the createButtons() function in the ajax updaters success function doesn't re-initialise the buttons.

Is it possible to do this?
Thanks for reading.